MCPcopy Create free account

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

Functions29,290 in github.com/astral-sh/ruff

↓ 112 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/context.rs:197
↓ 112 callersFunctionsemantic_index
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:74
↓ 111 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:12296
↓ 111 callersMethodtypevar
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/bound_super.rs:34
↓ 110 callersMethodintersects
Returns true if `self` and `other` contain at least one common rule. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let set_1 = Ru
crates/ruff_linter/src/registry/rule_set.rs:137
↓ 110 callersMethodkind
(self)
crates/ty_python_semantic/src/types/literal.rs:176
↓ 110 callersMethodtokens
Returns all tokens of the line, including comments and trailing new lines.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:205
↓ 109 callersMethodall
Creates a new rule selection from all known lints in the registry, including lints that are default by default. Lints that are disabled by default use
crates/ty_python_semantic/src/lint.rs:561
↓ 109 callersMethodas_str
Returns a human-readable name for this variance, matching the keyword argument names used in `TypeVar(covariant=True)` / `TypeVar(contravariant=True)`
crates/ty_python_semantic/src/types/variance.rs:98
↓ 109 callersFunctioninlay_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:819
↓ 108 callersMethodsegments
(&self)
crates/ruff_python_ast/src/name.rs:355
↓ 105 callersMethodclone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callersMethodreport_lint
( &'env self, lint: &'static LintMetadata, ranged: T, )
crates/ty_python_semantic/src/types/call/bind.rs:105
↓ 105 callersMethodtry_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3748
↓ 104 callersMethodinfo
Adds an "info" sub-diagnostic with the given message. If callers want to add an "info" sub-diagnostic with annotations, then create a [`SubDiagnostic
crates/ruff_db/src/diagnostic/mod.rs:169
↓ 103 callersMethodcontext
(&self)
crates/ruff_python_semantic/src/model.rs:3019
↓ 102 callersFunctionempty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 102 callersFunctiononce
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:92
↓ 102 callersMethodto_path_buf
Converts the path to an owned [`SystemPathBuf`].
crates/ruff_db/src/system/path.rs:370
↓ 102 callersMethodwrite_str
(&mut self, s: &str)
crates/mdtest/src/lib.rs:276
↓ 101 callersMethodas_ref
(&self)
crates/ruff_python_ast/src/name.rs:109
↓ 101 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ty_server/tests/e2e/main.rs:797
↓ 101 callersMethodstrip_prefix
( &self, base: impl AsRef<SystemPath>, )
crates/ruff_db/src/system/path.rs:323
↓ 100 callersMethodfind
Recognizes the beginning of a fenced code block if one is present on the given line.
crates/ty_ide/src/docstring/document/preformatted.rs:19
↓ 98 callersMethodas_std_path
(&self)
crates/ruff_db/src/system/path.rs:382
↓ 98 callersMethodcomments
(&self)
crates/ruff_python_formatter/src/context.rs:77
↓ 98 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1418
↓ 98 callersMethodvalue
(self)
crates/ty_python_semantic/src/types/typevar.rs:831
↓ 97 callersMethodid
The category for this [`Report`] Useful for looking searching for more information to resolve the diagnostic. <div class="warning"> Text passed to
crates/ruff_annotate_snippets/src/snippet.rs:193
↓ 97 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/callable.rs:718
↓ 97 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:498
↓ 97 callersMethodstarts_with
(&self, base: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:121
↓ 96 callersMethodbuild
(self)
crates/ty_module_resolver/src/testing.rs:192
↓ 96 callersMethodget
Returns the type that a typevar is mapped to, or None if the typevar isn't part of this mapping.
crates/ty_python_semantic/src/types/generics.rs:1313
↓ 96 callersMethodset_primary_annotation_message
Set the message on the primary annotation for this diagnostic. If a message already exists on the primary annotation, then this overwrites the existi
crates/ty_python_semantic/src/types/context.rs:427
↓ 95 callersMethodreport_lint
Optionally return a builder for a lint diagnostic guard. If the current context believes a diagnostic should be reported for the given lint, then a b
crates/ty_python_semantic/src/types/context.rs:279
↓ 95 callersMethodstart
(&self)
crates/ty_ide/src/importer.rs:506
↓ 94 callersMethodclass_literal
Returns the underlying class literal for this class, ignoring any specialization. For a non-generic class, this returns the class literal directly. F
crates/ty_python_semantic/src/types/class.rs:1199
↓ 94 callersMethodcontains
(&self, rule: Rule)
crates/ruff_linter/src/registry/rule_set.rs:245
↓ 94 callersMethodflatten
Flattens the hierarchical binary expression into a flat operand, operator, operand... sequence. See [`FlatBinaryExpressionSlice`] for an in depth exp
crates/ruff_python_formatter/src/expression/binary_like.rs:34
↓ 93 callersMethodlen
(&self)
crates/ruff_python_ast/src/nodes.rs:206
↓ 92 callersMethodhighlight_file
Get semantic tokens for the entire file
crates/ty_ide/src/semantic_tokens.rs:4721
↓ 92 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/class/known.rs:1191
↓ 90 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/subclass_of.rs:302
↓ 89 callersMethodseen_module
Return `true` if the [`Module`] was "seen" anywhere in the semantic model. This is used as a fast path to avoid unnecessary work when resolving symbol
crates/ruff_python_semantic/src/model.rs:1712
↓ 88 callersMethodfirst
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1136
↓ 88 callersMethodrange
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:533
↓ 87 callersMethodbuild
Generate a [`Command`] for the `ruff check` command.
crates/ruff/tests/integration_test.rs:72
↓ 87 callersMethodends_with
(&self, child: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:145
↓ 87 callersMethodlen
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:157
↓ 86 callersMethodfold
Control whether lines without [`Annotation`]s are shown The default is `fold(true)`, collapsing uninteresting lines. See [`AnnotationKind::Visible`]
crates/ruff_annotate_snippets/src/snippet.rs:311
↓ 86 callersMethodis_rule_enabled
(&self, rule: Rule)
crates/ruff_linter/src/checkers/ast/mod.rs:552
↓ 86 callersMethodmessage
Returns the program-settings error without its optional diagnostic detail.
crates/ty_project/src/metadata/options.rs:2179
↓ 86 callersMethodprogram_file
(&self, file: File)
crates/ty_ide/src/lib.rs:443
↓ 85 callersMethodexpr
Returns the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:540
↓ 85 callersMethodmemory_file_system
Returns the memory file system. ## Panics If the underlying test system isn't the [`InMemorySystem`].
crates/ruff_db/src/system/test.rs:79
↓ 85 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pylint/rules/non_slot_assignment.rs:97
↓ 84 callersMethodargs
(mut self, args: impl IntoIterator<Item = &'a str>)
crates/ruff/tests/integration_test.rs:66
↓ 84 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:107
↓ 84 callersMethodclone
(this: &Self)
crates/ty_server/src/session/request_queue.rs:153
↓ 84 callersMethoditer
(&self)
crates/ty_python_core/src/place.rs:332
↓ 83 callersMethodsecondary_title
For any secondary, or context, [`Group`][crate::Group]s (subsequent) in a [`Report`][crate::Report] See [`Group::with_title`][crate::Group::with_titl
crates/ruff_annotate_snippets/src/level.rs:104
↓ 82 callersMethodto_str
Returns the concatenated string value as a [`str`]. Note that this will perform an allocation on the first invocation if the string value is implicit
crates/ruff_python_ast/src/nodes.rs:1470
↓ 81 callersMethodas_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2680
↓ 81 callersMethodfind_keyword
Return the [`Keyword`] with the given name, or `None` if no such [`Keyword`] exists.
crates/ruff_python_ast/src/nodes.rs:3578
↓ 81 callersMethodinfer_expression
(&mut self, expression: &ast::Expr, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6309
↓ 81 callersFunctionsource_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:16
↓ 81 callersMethodsymbol_id
Returns the [`ScopedSymbolId`] of the place named `name`.
crates/ty_python_core/src/place.rs:241
↓ 80 callersMethodmatch_builtin_expr
Return `true` if `expr` is a reference to `builtins.$target`, i.e. either `object` (where `object` is not overridden in the global scope), or `builtin
crates/ruff_python_semantic/src/model.rs:405
↓ 80 callersMethodnode_range
(&self, start: TextSize)
crates/ruff_python_parser/src/parser/mod.rs:311
↓ 79 callersMethodsaturating_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:123
↓ 78 callersMethodfind_argument_value
Return the value for the argument with the given name or at the given position, or `None` if no such argument exists. Used to retrieve argument values
crates/ruff_python_ast/src/nodes.rs:3596
↓ 78 callersMethodis_stub
Returns `true` if the file should be analyzed as a type stub.
crates/ruff_db/src/files.rs:565
↓ 78 callersMethodvalue_type
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:406
↓ 77 callersMethodis_enabled
(self)
crates/ruff_linter/src/settings/flags.rs:15
↓ 77 callersMethodresolve_type_alias
If this type is a `Type::TypeAlias`, recursively resolves it to its underlying value type. Otherwise, returns `self` unchanged.
crates/ty_python_semantic/src/types.rs:2372
↓ 77 callersFunctionwrite
( output: &mut dyn Buffer<Context = Context>, args: Arguments<Context>, )
crates/ruff_formatter/src/lib.rs:859
↓ 76 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/tuple.rs:3228
↓ 76 callersFunctionopen
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:75
↓ 76 callersMethodrange
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:214
↓ 76 callersFunctionstr
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF065_0.py:37
↓ 75 callersMethodgenerator
Create a [`Generator`] to generate source code based on the current AST state.
crates/ruff_linter/src/checkers/ast/mod.rs:337
↓ 75 callersMethodintersects
Returns `true` if the given range intersects with any comment range.
crates/ruff_python_trivia/src/comment_ranges.rs:79
↓ 75 callersMethodis_assignable_to
Return true if this type is assignable to type `target`. See `TypeRelation::Assignability` for more details.
crates/ty_python_semantic/src/types/relation.rs:394
↓ 75 callersFunctionparse_suite
(source: &str)
crates/ruff_python_parser/src/string.rs:541
↓ 75 callersMethodprogram_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:841
↓ 74 callersMethodfind
Returns the [`ParameterWithDefault`] with the given name, or `None` if no such [`ParameterWithDefault`] exists.
crates/ruff_python_ast/src/nodes.rs:3162
↓ 73 callersMethodrange
(&self)
crates/ty_ide/src/lib.rs:208
↓ 73 callersMethodstarts_with
(&self, other: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:155
↓ 72 callersMethodbump
Bumps the current token assuming it is of the given kind. # Panics If the current token is not of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:439
↓ 72 callersMethodjoin
(&self, component: &str)
crates/ty_module_resolver/src/path.rs:917
↓ 71 callersMethodcontents
The contents of the docstring, including the opening and closing quotes.
crates/ruff_linter/src/docstrings/mod.rs:30
↓ 71 callersMethodfile
(&self)
crates/ty_ide/src/lib.rs:147
↓ 71 callersMethodidentity
Get the identity of this bound typevar occurrence. This includes the source-level typevar, binding context, `ParamSpec` attribute, and freshness nonc
crates/ty_python_semantic/src/types/typevar.rs:1054
↓ 71 callersMethodinsert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 71 callersMethodstatic_class_literal
Returns the statement-defined class literal and specialization for this class. For a non-generic class, this is the class itself. For a generic alias,
crates/ty_python_semantic/src/types/class.rs:1225
↓ 71 callersMethodwrite_file
Writes a file to the test directory. Parent directories are created automatically if they don't exist. Content is dedented to remove common leading w
crates/ruff/tests/cli/main.rs:148
↓ 70 callersMethodas_slice
(&self)
crates/ty_python_semantic/src/types/callable.rs:660
↓ 70 callersMethodcount
(&self)
crates/ruff_formatter/src/format_element/tag.rs:354
↓ 70 callersMethodfind
(&self, policy: &NameMatchPolicy)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:152
← previousnext →101–200 of 29,290, ranked by callers