Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 134 callers
Method
len
Returns the length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:1007
↓ 134 callers
Method
line_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
↓ 130 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/context.rs:210
↓ 128 callers
Function
isinstance
(a, b)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM101.py:46
↓ 125 callers
Method
comment_ranges
Returns the [`CommentRanges`] for the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:452
↓ 124 callers
Method
as_slice
(&self)
crates/ruff_index/src/vec.rs:52
↓ 124 callers
Method
text_len
(&self)
crates/ruff_linter/src/locator.rs:115
↓ 123 callers
Method
resolve_type_alias
Resolve aliases and recursive binders at the outermost level.
crates/ty_python_semantic/src/types.rs:3092
↓ 123 callers
Method
split
(self, sep=None, maxsplit=-1)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:6
↓ 122 callers
Method
is_empty
(&self)
crates/ty_python_semantic/src/types/cyclic.rs:1237
↓ 120 callers
Method
binding
(&self, id: BindingId)
crates/ruff_python_semantic/src/model.rs:259
↓ 120 callers
Method
report_lint
( &'env self, lint: &'static LintMetadata, ranged: T, )
crates/ty_python_semantic/src/types/call/bind.rs:120
↓ 119 callers
Method
start
(&self)
crates/ty_python_semantic/src/importer.rs:713
↓ 119 callers
Method
to_path_buf
Converts the path to an owned [`SystemPathBuf`].
crates/ruff_db/src/system/path.rs:384
↓ 117 callers
Function
inlay_hint_test
(source: &str)
crates/ty_ide/src/inlay_hints.rs:912
↓ 117 callers
Method
iter
Returns an iterator over the [`Code`]s in the `noqa` directive.
crates/ruff_linter/src/noqa.rs:129
↓ 117 callers
Method
tokens
Returns all tokens of the line, including comments and trailing new lines.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:205
↓ 115 callers
Method
as_ref
(&self)
crates/ruff_python_ast/src/name.rs:109
↓ 115 callers
Method
build
(self)
crates/ty_module_resolver/src/testing.rs:209
↓ 115 callers
Method
intersects
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
↓ 115 callers
Method
segments
(&self)
crates/ruff_python_ast/src/name.rs:351
↓ 114 callers
Method
get
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:1398
↓ 113 callers
Method
class_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:1247
↓ 113 callers
Method
clone
(this: &Self)
crates/ty_server/src/session/request_queue.rs:159
↓ 111 callers
Method
as_std_path
(&self)
crates/ruff_db/src/system/path.rs:396
↓ 111 callers
Function
once
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:92
↓ 111 callers
Method
value
(self)
crates/ty_python_semantic/src/types/typevar.rs:905
↓ 109 callers
Method
strip_prefix
( &self, base: impl AsRef<SystemPath>, )
crates/ruff_db/src/system/path.rs:337
↓ 108 callers
Method
flatten
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
↓ 108 callers
Method
try_set_fix
(&mut self, func: impl FnOnce() -> anyhow::Result<Fix>)
crates/ruff_linter/src/checkers/ast/mod.rs:3935
↓ 107 callers
Function
empty
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:118
↓ 107 callers
Method
info
(&self)
crates/ty_python_semantic/src/lint.rs:545
↓ 106 callers
Method
len
(&self)
crates/ruff_python_ast/src/nodes.rs:283
↓ 105 callers
Method
as_slice
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5115
↓ 105 callers
Method
clone
(&self)
crates/ruff_python_ast/src/node_index.rs:233
↓ 105 callers
Method
identity
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:1112
↓ 105 callers
Method
to_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/class/known.rs:1247
↓ 104 callers
Function
source_text
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:16
↓ 104 callers
Method
write_str
(&mut self, s: &str)
crates/mdtest/src/lib.rs:276
↓ 103 callers
Method
context
(&self)
crates/ruff_python_semantic/src/model.rs:3223
↓ 103 callers
Method
first
(&self)
crates/ruff_index/src/slice.rs:44
↓ 103 callers
Method
set_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:527
↓ 103 callers
Method
starts_with
(&self, base: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:135
↓ 102 callers
Method
iter
Returns an iterator of all of the typevars in this support.
crates/ty_python_semantic/src/types/constraints/support.rs:78
↓ 102 callers
Method
to_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/subclass_of.rs:318
↓ 100 callers
Method
message
Returns the program-settings error without its optional diagnostic detail.
crates/ty_project/src/metadata/options.rs:2436
↓ 99 callers
Method
context
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:73
↓ 98 callers
Method
comments
(&self)
crates/ruff_python_formatter/src/context.rs:77
↓ 98 callers
Method
kind
(self)
crates/ty_python_semantic/src/types/literal.rs:178
↓ 98 callers
Method
memory_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
↓ 98 callers
Method
program_file
(&self, file: File)
crates/ty_ide/src/lib.rs:444
↓ 98 callers
Method
range
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:214
↓ 97 callers
Method
id
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 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:498
↓ 96 callers
Method
highlight_file
Get semantic tokens for the entire file
crates/ty_ide/src/semantic_tokens.rs:5032
↓ 96 callers
Method
symbol_id
Returns the [`ScopedSymbolId`] of the place named `name`.
crates/ty_python_core/src/place.rs:287
↓ 95 callers
Method
contains
(&self, rule: Rule)
crates/ruff_linter/src/registry/rule_set.rs:245
↓ 95 callers
Method
report_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:351
↓ 94 callers
Method
is_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:451
↓ 93 callers
Method
ends_with
(&self, child: impl AsRef<SystemPath>)
crates/ruff_db/src/system/path.rs:159
↓ 93 callers
Method
program_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:889
↓ 92 callers
Method
expr
Returns the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:548
↓ 92 callers
Method
replace
Replace this tree with another tree, preserving each node's relation.
crates/ty_python_semantic/src/types/relation_error.rs:1017
↓ 91 callers
Method
range
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:533
↓ 91 callers
Method
seen_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:1742
↓ 90 callers
Method
as_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2680
↓ 90 callers
Method
find_keyword
Return the [`Keyword`] with the given name, or `None` if no such [`Keyword`] exists.
crates/ruff_python_ast/src/nodes.rs:3764
↓ 90 callers
Method
first
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1136
↓ 90 callers
Method
fold
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 callers
Function
place_table
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:91
↓ 89 callers
Method
static_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:1273
↓ 89 callers
Method
typevar
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/bound_super.rs:41
↓ 88 callers
Method
find
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
↓ 88 callers
Method
is_rule_enabled
(&self, rule: Rule)
crates/ruff_linter/src/checkers/ast/mod.rs:576
↓ 88 callers
Method
is_stub
Returns `true` if the file should be analyzed as a type stub.
crates/ruff_db/src/files.rs:567
↓ 88 callers
Method
len
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:157
↓ 88 callers
Method
starts_with
(&self, other: &ModuleName)
crates/ty_module_resolver/src/module_name.rs:154
↓ 87 callers
Method
build
Generate a [`Command`] for the `ruff check` command.
crates/ruff/tests/integration_test.rs:72
↓ 87 callers
Method
variables
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/generics.rs:551
↓ 86 callers
Method
infer_expression
(&mut self, expression: &ast::Expr, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6790
↓ 85 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:107
↓ 85 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pylint/rules/non_slot_assignment.rs:97
↓ 84 callers
Method
args
(mut self, args: impl IntoIterator<Item = &'a str>)
crates/ruff/tests/integration_test.rs:66
↓ 84 callers
Method
borrow_mut
(&mut self)
crates/ruff_index/src/vec.rs:117
↓ 84 callers
Method
matches_qualified_name
(&self, expr: &Expr, target: &[&str])
crates/ruff_python_semantic/src/model.rs:1172
↓ 84 callers
Function
str
(s)
crates/ruff_linter/resources/test/fixtures/ruff/RUF065_0.py:37
↓ 83 callers
Method
count
(&self)
crates/ruff_formatter/src/format_element/tag.rs:354
↓ 83 callers
Method
secondary_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 callers
Method
to_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:1657
↓ 82 callers
Method
extend
(&mut self, other: &InferContextResult)
crates/ty_python_semantic/src/types/context.rs:251
↓ 82 callers
Method
match_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:429
↓ 81 callers
Function
use_def_map
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:104
↓ 80 callers
Method
find_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:3782
↓ 80 callers
Method
insert
( &mut self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, value: Expr
crates/ty_python_semantic/src/types/infer/builder.rs:12984
↓ 80 callers
Method
iter
Returns an iterator over the matched parameters.
crates/ty_python_semantic/src/types/call/bind.rs:8399
↓ 80 callers
Method
node_range
(&self, start: TextSize)
crates/ruff_python_parser/src/parser/mod.rs:284
↓ 79 callers
Method
is_enabled
(self)
crates/ruff_linter/src/settings/flags.rs:15
↓ 79 callers
Method
parameters
Parameters bound by this recursive type constructor.
crates/ty_python_semantic/src/types/recursive.rs:486
↓ 79 callers
Method
range
(&self)
crates/ty_ide/src/lib.rs:214
↓ 78 callers
Method
completion_test_builder
(&self)
crates/ty_ide/src/completion.rs:11878
← previous
next →
101–200 of 31,766, ranked by callers