MCPcopy Create free account

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

Functions31,562 in github.com/astral-sh/ruff

↓ 134 callersMethodline_start
When manually [`fold`][Self::fold]ing, the [`source`][Self::source]s line offset from the original start
crates/ruff_annotate_snippets/src/snippet.rs:281
↓ 133 callersMethodlen
Returns the length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:1007
↓ 130 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/context.rs:208
↓ 126 callersFunctionisinstance
(a, b)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM101.py:46
↓ 125 callersMethodtext_len
(&self)
crates/ruff_linter/src/locator.rs:115
↓ 124 callersMethodas_slice
(&self)
crates/ruff_index/src/vec.rs:52
↓ 124 callersMethodcomment_ranges
Returns the [`CommentRanges`] for the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:447
↓ 122 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/cyclic.rs:1225
↓ 121 callersMethodresolve_type_alias
Resolve aliases and recursive binders at the outermost level.
crates/ty_python_semantic/src/types.rs:3093
↓ 121 callersMethodsplit
(self, sep=None, maxsplit=-1)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:6
↓ 120 callersMethodbinding
(&self, id: BindingId)
crates/ruff_python_semantic/src/model.rs:259
↓ 119 callersMethodreport_lint
( &'env self, lint: &'static LintMetadata, ranged: T, )
crates/ty_python_semantic/src/types/call/bind.rs:120
↓ 119 callersMethodsegments
(&self)
crates/ruff_python_ast/src/name.rs:351
↓ 119 callersMethodstart
(&self)
crates/ty_python_semantic/src/importer.rs:712
↓ 118 callersMethodto_path_buf
Converts the path to an owned [`SystemPathBuf`].
crates/ruff_db/src/system/path.rs:384
↓ 117 callersFunctioninlay_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:912
↓ 117 callersMethoditer
Returns an iterator over the [`Code`]s in the `noqa` directive.
crates/ruff_linter/src/noqa.rs:129
↓ 115 callersMethodas_ref
(&self)
crates/ruff_python_ast/src/name.rs:109
↓ 115 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
↓ 114 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
↓ 112 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:1228
↓ 112 callersMethodstrip_prefix
( &self, base: impl AsRef<SystemPath>, )
crates/ruff_db/src/system/path.rs:337
↓ 111 callersMethodas_std_path
(&self)
crates/ruff_db/src/system/path.rs:396
↓ 110 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:1386
↓ 108 callersMethodbuild
(self)
crates/ty_module_resolver/src/testing.rs:209
↓ 108 callersMethodclone
(this: &Self)
crates/ty_server/src/session/request_queue.rs:153
↓ 108 callersMethodtry_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3916
↓ 108 callersMethodvalue
(self)
crates/ty_python_semantic/src/types/typevar.rs:900
↓ 107 callersFunctionempty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 107 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
↓ 107 callersMethodinfo
(&self)
crates/ty_python_semantic/src/lint.rs:545
↓ 107 callersFunctiononce
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:92
↓ 105 callersMethodclone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callersMethodlen
(&self)
crates/ruff_python_ast/src/nodes.rs:270
↓ 104 callersFunctionsource_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:16
↓ 104 callersMethodstarts_with
(&self, base: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:135
↓ 104 callersMethodwrite_str
(&mut self, s: &str)
crates/mdtest/src/lib.rs:276
↓ 103 callersMethodcontext
(&self)
crates/ruff_python_semantic/src/model.rs:3194
↓ 103 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:1107
↓ 103 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:504
↓ 103 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/class/known.rs:1247
↓ 102 callersMethodas_slice
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5234
↓ 100 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/subclass_of.rs:314
↓ 99 callersMethodkind
(self)
crates/ty_python_semantic/src/types/literal.rs:178
↓ 99 callersMethodmessage
Returns the program-settings error without its optional diagnostic detail.
crates/ty_project/src/metadata/options.rs:2337
↓ 98 callersMethodcomments
(&self)
crates/ruff_python_formatter/src/context.rs:77
↓ 98 callersMethodfirst
(&self)
crates/ruff_index/src/slice.rs:44
↓ 98 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:94
↓ 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 callersMethodprogram_file
(&self, file: File)
crates/ty_ide/src/lib.rs:444
↓ 97 callersMethodrange
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:214
↓ 97 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:498
↓ 96 callersMethodhighlight_file
Get semantic tokens for the entire file
crates/ty_ide/src/semantic_tokens.rs:5032
↓ 96 callersMethoditer
Returns an iterator of all of the typevars in this support.
crates/ty_python_semantic/src/types/constraints/support.rs:79
↓ 95 callersMethodcontains
(&self, rule: Rule)
crates/ruff_linter/src/registry/rule_set.rs:245
↓ 95 callersMethodcontext
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:73
↓ 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:332
↓ 95 callersMethodsymbol_id
Returns the [`ScopedSymbolId`] of the place named `name`.
crates/ty_python_core/src/place.rs:287
↓ 93 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:450
↓ 92 callersMethodends_with
(&self, child: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:159
↓ 92 callersMethodexpr
Returns the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:548
↓ 92 callersMethodprogram_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:870
↓ 91 callersMethodrange
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:533
↓ 91 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:1713
↓ 90 callersMethodfind_keyword
Return the [`Keyword`] with the given name, or `None` if no such [`Keyword`] exists.
crates/ruff_python_ast/src/nodes.rs:3751
↓ 90 callersMethodfirst
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1136
↓ 90 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
↓ 89 callersMethodreplace
Replace this tree with another tree, preserving each node's relation.
crates/ty_python_semantic/src/types/relation_error.rs:1017
↓ 88 callersMethodis_rule_enabled
(&self, rule: Rule)
crates/ruff_linter/src/checkers/ast/mod.rs:571
↓ 88 callersMethodlen
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:157
↓ 88 callersMethodtypevar
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/bound_super.rs:41
↓ 87 callersMethodas_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2680
↓ 87 callersMethodbuild
Generate a [`Command`] for the `ruff check` command.
crates/ruff/tests/integration_test.rs:72
↓ 87 callersMethodis_stub
Returns `true` if the file should be analyzed as a type stub.
crates/ruff_db/src/files.rs:567
↓ 87 callersMethodstarts_with
(&self, other: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:154
↓ 87 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:1254
↓ 86 callersMethodinfer_expression
(&mut self, expression: &ast::Expr, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6670
↓ 86 callersFunctionplace_table
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:91
↓ 86 callersMethodvariables
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/generics.rs:553
↓ 85 callersMethodas_str
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:107
↓ 85 callersMethodfind
Look for an import already in this importer's module that satisfies the given request. If found, the corresponding import is returned along with the w
crates/ty_python_semantic/src/importer.rs:406
↓ 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 callersFunctionstr
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF065_0.py:37
↓ 83 callersMethodborrow_mut
(&mut self)
crates/ruff_index/src/vec.rs:117
↓ 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
↓ 83 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:1644
↓ 82 callersMethodcount
(&self)
crates/ruff_formatter/src/format_element/tag.rs:354
↓ 81 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:444
↓ 80 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:3769
↓ 80 callersMethodinsert
( &mut self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, value: Expr
crates/ty_python_semantic/src/types/infer/builder.rs:12835
↓ 80 callersMethodnode_range
(&self, start: TextSize)
crates/ruff_python_parser/src/parser/mod.rs:284
↓ 80 callersFunctionuse_def_map
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:104
↓ 79 callersMethodextend
(&mut self, other: &InferContextResult)
crates/ty_python_semantic/src/types/context.rs:249
↓ 79 callersMethodrange
(&self)
crates/ty_ide/src/lib.rs:214
↓ 78 callersMethodcompletion_test_builder
(&self)
crates/ty_ide/src/completion.rs:11800
↓ 78 callersMethodinsert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 78 callersMethodintersects
Returns `true` if the given range intersects with any comment range.
crates/ruff_python_trivia/src/comment_ranges.rs:79
↓ 78 callersMethodis_enabled
(self)
crates/ruff_linter/src/settings/flags.rs:15
↓ 78 callersMethoditer
Returns an iterator over the matched parameters.
crates/ty_python_semantic/src/types/call/bind.rs:8282
← previousnext →101–200 of 31,562, ranked by callers