MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions28,707 in github.com/astral-sh/ruff

↓ 18 callersMethodreturn_type
Compute the overall effective return type of this `ConstructorBinding`.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:311
↓ 18 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/context.rs:206
↓ 18 callersMethodscope_id
The scope in which the reference is defined.
crates/ruff_python_semantic/src/reference.rs:36
↓ 18 callersMethodshrink_to_fit
(&mut self)
crates/ty_python_semantic/src/types/diagnostic.rs:1365
↓ 18 callersMethodspecialization
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:5755
↓ 18 callersMethodsystem
(&self)
crates/ruff_db/src/system/test.rs:90
↓ 18 callersMethodty
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1207
↓ 18 callersMethodtype_argument
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:10251
↓ 18 callersMethodvisit_body
(&mut self, body: &'db [ast::Stmt])
crates/ty_ide/src/symbols.rs:844
↓ 17 callersMethodas_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/unused_noqa.rs:21
↓ 17 callersMethodas_symbol
Returns `Some` if the reference is a `Symbol`, otherwise `None`.
crates/ty_python_core/src/place.rs:112
↓ 17 callersMethodchar_column
Set the default column to display <div class="warning"> `char_column` is only be respected if [`Origin::line`] is also set. </div>
crates/ruff_annotate_snippets/src/snippet.rs:570
↓ 17 callersFunctioncheck_os_pathlib_single_arg_calls
We check functions that take only 1 argument, this does not apply to functions with `dir_fd` argument, because `dir_fd` is not supported by pathlib,
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:53
↓ 17 callersMethodchild_scopes
Returns an iterator over the direct child scopes of `scope`.
crates/ty_python_core/src/lib.rs:562
↓ 17 callersMethodclass
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/instance.rs:269
↓ 17 callersMethoddefault_specialization
Returns the default specialization for this class. For static classes, this applies default type arguments. For dynamic classes, this returns a non-g
crates/ty_python_semantic/src/types/class.rs:718
↓ 17 callersFunctiondelete_stmt
Return the [`Edit`] to use when deleting a [`Stmt`]. In some cases, this is as simple as deleting the [`TextRange`] of the [`Stmt`] itself. However,
crates/ruff_linter/src/fix/edits.rs:39
↓ 17 callersMethodfinish
(self)
crates/ty_python_core/src/place.rs:418
↓ 17 callersMethodfirst_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1091
↓ 17 callersMethodformat
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callersMethodformat
Whether to enable concise diagnostic output or not.
crates/ruff_db/src/diagnostic/mod.rs:1469
↓ 17 callersMethodget
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:415
↓ 17 callersMethodin_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:428
↓ 17 callersMethodintersect
Return a new tuple-spec builder that reflects the intersection of this tuple and another tuple, or `None` if the intersection is impossible (e.g., two
crates/ty_python_semantic/src/types/tuple.rs:3047
↓ 17 callersMethodinto_iter
(self)
crates/ruff_linter/src/registry/rule_set.rs:333
↓ 17 callersMethodinto_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:37
↓ 17 callersMethodis_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callersMethodis_eof
(self)
crates/ruff_python_ast/src/token.rs:327
↓ 17 callersMethodis_same_typevar_as
Returns whether two bound typevars represent the same occurrence, regardless of e.g. differences in their bounds or constraints due to materialization
crates/ty_python_semantic/src/types/typevar.rs:1114
↓ 17 callersMethodis_typevartuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:255
↓ 17 callersMethodlen
Returns the number of rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; assert_eq!(RuleSet::empty().len(), 0); as
crates/ruff_linter/src/registry/rule_set.rs:177
↓ 17 callersMethodnode
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1451
↓ 17 callersMethodnode_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callersMethodordered_source_order
Repeating a source-order tree cannot change the first occurrence of any constraint, so combining identical trees must reuse their existing sidecar.
crates/ty_python_semantic/src/types/constraints.rs:1487
↓ 17 callersMethodparamspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:993
↓ 17 callersMethodpath
Returns the relative path as specified by the user.
crates/ty_project/src/metadata/value.rs:52
↓ 17 callersFunctionplace_from_bindings
Infer the combined type from an iterator of bindings, and return it together with boundness information in a [`Place`]. The type will be a union if t
crates/ty_python_semantic/src/place.rs:787
↓ 17 callersMethodplace_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:246
↓ 17 callersMethodprefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:19
↓ 17 callersMethodremove_file
(self, db: &mut dyn Db, file: File)
crates/ty_project/src/lib.rs:515
↓ 17 callersFunctionrename
Perform a rename operation on the symbol at the given position. Returns all locations that need to be updated with the new name.
crates/ty_ide/src/rename.rs:57
↓ 17 callersMethodsearch
Returns a sequence of symbols that matches the given query.
crates/ty_ide/src/symbols.rs:153
↓ 17 callersFunctionsite_packages_directories_from_sys_prefix
Attempt to retrieve the `site-packages` directories associated with a given Python installation. The location of the `site-packages` directories can
crates/ty_site_packages/src/lib.rs:1612
↓ 17 callersMethodsnapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
↓ 17 callersMethodterm_width
Set the width to render within Affects the rendering of [`Snippet`][crate::Snippet]s
crates/ruff_annotate_snippets/src/renderer/mod.rs:170
↓ 17 callersMethodto_meta_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/instance.rs:471
↓ 17 callersMethodto_str
(&self, db: &'a dyn Db)
crates/ty_module_resolver/src/resolve.rs:1280
↓ 17 callersMethodtrim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:113
↓ 17 callersMethodtruncate
(&mut self, a: usize)
crates/ruff_index/src/vec.rs:47
↓ 17 callersMethodvalues
Returns an iterator over the fixes in the map.
crates/ruff/src/diagnostics.rs:146
↓ 17 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:388
↓ 16 callersMethodadd_binding
Add a binding for the given definition. Returns the result of the `infer_value_ty` closure, which is called with the declared type as type context.
crates/ty_python_semantic/src/types/infer/builder.rs:1397
↓ 16 callersMethodadd_python_cell
(&mut self, content: &str)
crates/ty_server/tests/e2e/notebook.rs:596
↓ 16 callersMethodall
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:77
↓ 16 callersMethodas_code
Access the resulting code, borrowing the result
crates/ruff_formatter/src/lib.rs:414
↓ 16 callersMethodas_function_def
Return the [`ast::StmtFunctionDef`] of the definition, if it's a function definition.
crates/ruff_python_semantic/src/definition.rs:174
↓ 16 callersMethodas_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:399
↓ 16 callersMethodas_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2606
↓ 16 callersMethodas_system
(&self)
crates/ty_test/src/db.rs:413
↓ 16 callersMethodassert_progressing
(&mut self, p: &Parser)
crates/ruff_python_parser/src/parser/progress.rs:35
↓ 16 callersFunctioncatch_unwind
Invokes a closure, capturing and returning the cause of an unwinding panic if one occurs. ### Thread safety This is implemented by installing a cust
crates/ruff_db/src/panic.rs:145
↓ 16 callersMethodcontents
(&self)
crates/ruff_server/src/edit/text_document.rs:68
↓ 16 callersMethodcurrent_expressions
Returns an [`Iterator`] over the current expression hierarchy, from the current [`Expr`] through to any parents.
crates/ruff_python_semantic/src/model.rs:1487
↓ 16 callersMethoddb
Returns the underlying test DB.
crates/ty_ide/src/completion.rs:11193
↓ 16 callersMethodexactly_one
(self)
crates/ty_python_semantic/src/types/callable.rs:726
↓ 16 callersMethodextend
Extend `self` with the components of `other` # Examples ``` use ty_module_resolver::ModuleName; let mut module_name = ModuleName::new_static("foo")
crates/ty_module_resolver/src/module_name.rs:281
↓ 16 callersMethodextension
(&self)
crates/ty_module_resolver/src/path.rs:840
↓ 16 callersMethodindex
(self)
crates/ty_python_semantic/src/types/constraints.rs:3416
↓ 16 callersMethodinitialization_result
Get the initialization result
crates/ty_server/tests/e2e/main.rs:767
↓ 16 callersMethodis_global
Returns `true` if this is the id of the global scope
crates/ruff_python_semantic/src/scope.rs:252
↓ 16 callersMethodopen
Open or create a new cache. `package_root` is the path to root of the package that is contained within this cache and must be canonicalized (to avoid
crates/ruff/src/cache.rs:94
↓ 16 callersMethodor
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:455
↓ 16 callersMethodprogram_file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:72
↓ 16 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:585
↓ 16 callersMethodremaining_literal_union
Expand this complement to the union of enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:785
↓ 16 callersMethodresolve
Resolves a stored property accessor to the value type exposed by that access.
crates/ty_python_semantic/src/types/protocol_class.rs:1228
↓ 16 callersMethodreverse
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:173
↓ 16 callersMethodset
Set the value of the `AtomicNodeIndex`.
crates/ruff_python_ast/src/node_index.rs:177
↓ 16 callersMethodset_fix
Set the fix for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:369
↓ 16 callersMethodto_search_paths
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_module_resolver/src/settings.rs:55
↓ 16 callersMethodto_text_size
( &self, db: &dyn Db, file: File, uri: &lsp_types::Uri, encoding: Posi
crates/ty_server/src/document/range.rs:133
↓ 16 callersMethodtry_to_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1230
↓ 16 callersMethodtuple_spec
If this is an instance type where the class has a tuple spec, returns the tuple spec. I.e., for the type `tuple[int, str]`, this will return the tupl
crates/ty_python_semantic/src/types/instance.rs:313
↓ 16 callersMethodvalues
(&self)
crates/ruff_python_index/src/interpolated_string_ranges.rs:70
↓ 16 callersMethodwhen_all
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:219
↓ 16 callersMethodwith_qualifiers
(self, qualifiers: TypeQualifiers)
crates/ty_python_semantic/src/place.rs:332
↓ 16 callersMethodwrite_char
( ch: char, quote: Quote, formatter: &mut impl std::fmt::Write, )
crates/ruff_python_literal/src/escape.rs:178
↓ 16 callersMethodwrite_file
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`.
crates/ruff_db/src/system/memory_fs.rs:192
↓ 15 callersMethodapply_type_mapping
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, type_mapping: &TypeMap
crates/ty_python_semantic/src/types/generics.rs:1431
↓ 15 callersMethodas_function_literal
(self)
crates/ty_python_semantic/src/types.rs:2228
↓ 15 callersMethodas_i64
(self)
crates/ty_python_semantic/src/types/literal.rs:313
↓ 15 callersMethodas_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:153
↓ 15 callersMethodas_str
The code that is ignored by the `noqa` directive.
crates/ruff_linter/src/noqa.rs:102
↓ 15 callersMethodas_typevar
(self)
crates/ty_python_semantic/src/types/typevar.rs:38
↓ 15 callersFunctionassert_ok
(result: &Result<Vec<Diagnostic>, FailuresByLine>)
crates/mdtest/src/matcher.rs:627
↓ 15 callersMethodcompletion_request
Sends a `textDocument/completion` request for the document at the given URI and position.
crates/ty_server/tests/e2e/main.rs:995
↓ 15 callersMethodconcise_message
Introspects this diagnostic and returns its message for concise formatting. When we concisely format diagnostics, we likely want to not only include
crates/ruff_db/src/diagnostic/mod.rs:237
↓ 15 callersFunctioncovering_node
Returns the node with a minimal range that fully contains `range`. If `range` is empty and falls within a parser *synthesized* node generated during
crates/ruff_python_ast/src/find_node.rs:14
↓ 15 callersFunctiondefault_lint_registry
Returns the default registry with all known semantic lints.
crates/ty_python_semantic/src/lib.rs:75
↓ 15 callersMethoddefinition
(&self)
crates/ty_python_semantic/src/types/ide_support.rs:2131
← previousnext →801–900 of 28,707, ranked by callers