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
↓ 15 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/string/normalize.rs:787
↓ 15 callers
Method
node_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.rs:452
↓ 15 callers
Method
or
Merge the provenance from two places.
crates/ty_python_semantic/src/place.rs:115
↓ 15 callers
Method
path
(&'a self, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1153
↓ 15 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/db.rs:107
↓ 15 callers
Method
project
(source: &str)
crates/ty_project/src/uv/environments.rs:1457
↓ 15 callers
Method
push
(&mut self, constraint: Assignment<ConstraintId>)
crates/ty_python_semantic/src/types/constraints.rs:5167
↓ 15 callers
Method
qualifiers
Get qualifiers for an annotation expression.
crates/ty_python_semantic/src/types/infer.rs:1152
↓ 15 callers
Function
quit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:9
↓ 15 callers
Function
remove_file
()
crates/ruff_db/src/system/memory_fs.rs:971
↓ 15 callers
Method
replace_deferred_state
Temporarily changes lookup behavior without discarding the current string annotation. Parsed string nodes do not belong to the module's semantic inde
crates/ty_python_semantic/src/types/infer/builder.rs:1073
↓ 15 callers
Function
resolve
Resolve the relevant settings strategy and defaults for the current invocation.
crates/ruff/src/resolve.rs:19
↓ 15 callers
Function
search_paths
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, resolve_mode: ModuleResolveMode
crates/ty_module_resolver/src/resolve.rs:493
↓ 15 callers
Method
self_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/method.rs:72
↓ 15 callers
Method
source_code
Return the notebook content. This is the concatenation of all Python code cells.
crates/ruff_notebook/src/notebook.rs:375
↓ 15 callers
Method
source_type
(&self)
crates/ruff_python_formatter/src/options.rs:131
↓ 15 callers
Method
source_type
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:127
↓ 15 callers
Method
specialize
Creates a specialization of this generic context. Panics if the length of `types` does not match the number of typevars in the generic context. You m
crates/ty_python_semantic/src/types/generics.rs:995
↓ 15 callers
Method
take
Takes a snapshot of the current state of the matched overload bindings. # Panics Panics if the indexes of the matched overloads are not valid for th
crates/ty_python_semantic/src/types/call/bind.rs:10013
↓ 15 callers
Method
text_len
(&self)
crates/ruff_source_file/src/newlines.rs:333
↓ 15 callers
Method
to_subclass_of
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class and all possible subclasses of the class. If the class
crates/ty_python_semantic/src/types/class/known.rs:1484
↓ 15 callers
Method
tokens
Returns the [`Tokens`] for the parsed type annotation if the checker is in a typing context or the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:504
↓ 15 callers
Function
trace_source_order_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:158
↓ 15 callers
Function
trace_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:167
↓ 15 callers
Function
undefined
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:1043
↓ 15 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:33
↓ 15 callers
Method
visit_expr
(&self, expr: &mut Expr)
crates/ruff_python_ast/src/visitor/transformer.rs:20
↓ 15 callers
Method
with_site_packages
Convert to a builder that supports site-packages (third-party dependencies).
crates/ty_ide/src/lib.rs:620
↓ 15 callers
Method
without_paramspec_attr
Returns a new bound typevar instance without any `ParamSpec` attribute set. This method will also remove any upper bound that was set by `with_params
crates/ty_python_semantic/src/types/typevar.rs:1251
↓ 15 callers
Method
write_all
(&mut self, buf: &[u8])
crates/ty/src/logging.rs:311
↓ 14 callers
Method
access
(&self, mode: ProtocolMemberAccessMode)
crates/ty_python_semantic/src/types/protocol_class.rs:2483
↓ 14 callers
Method
add
Adds a member to the table or updates the flags of an existing member if it already exists. Members are identified by their expression, which is hash
crates/ty_python_core/src/member.rs:623
↓ 14 callers
Method
all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:995
↓ 14 callers
Method
ancestors
(&self)
crates/ruff_db/src/system/path.rs:215
↓ 14 callers
Function
any_qualified_base_class
Return `true` if any base class matches a [`QualifiedName`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:16
↓ 14 callers
Method
any_rule_enabled
(&self, rules: &[Rule])
crates/ruff_linter/src/checkers/ast/mod.rs:582
↓ 14 callers
Method
apply_optional_specialization
Applies an optional specialization to this specialization.
crates/ty_python_semantic/src/types/generics.rs:1540
↓ 14 callers
Method
as_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:204
↓ 14 callers
Method
as_expr_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1139
↓ 14 callers
Method
as_slice
Returns a slice containing the remaining comments.
crates/ruff_python_formatter/src/verbatim.rs:568
↓ 14 callers
Method
as_str
(self)
crates/ty/src/python_version.rs:25
↓ 14 callers
Method
as_str
(&self)
crates/ruff_source_file/src/newlines.rs:258
↓ 14 callers
Method
assert_fixture
(&self, parameter_name: &str, path: &str, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4383
↓ 14 callers
Function
assert_include
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:362
↓ 14 callers
Method
bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:856
↓ 14 callers
Method
canonicalize
(path: &SystemPath, system: &dyn System)
crates/ty_module_resolver/src/resolve.rs:794
↓ 14 callers
Method
clear
Clear the parsed module, dropping the AST once all references to it are dropped.
crates/ruff_db/src/parsed.rs:183
↓ 14 callers
Method
concise_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:253
↓ 14 callers
Method
constraint
Convert this result into a constraint for a branch with the given truthiness.
crates/ty_python_semantic/src/types/equality.rs:103
↓ 14 callers
Function
create_syntax_error_diagnostics
Create Ruff-style syntax error diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:3050
↓ 14 callers
Method
current_directory
(&self)
crates/ty_test/src/db.rs:570
↓ 14 callers
Method
current_scopes
Returns an iterator over all scopes, starting from the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1579
↓ 14 callers
Method
current_statement_parent
Return the parent [`Stmt`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1497
↓ 14 callers
Method
diagnostic_source
(&self, resolver: &dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1172
↓ 14 callers
Function
divergent
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, id_bits: u64, materialization: Option<Materi
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:362
↓ 14 callers
Method
expression
The source text of the expression (e.g., `0x0` in `f"{0x0=}"`).
crates/ruff_python_ast/src/nodes.rs:536
↓ 14 callers
Method
file
(self, db: &dyn Db)
crates/ty_python_core/src/scope.rs:26
↓ 14 callers
Method
file_type
Returns the entry's file type without following symlinks.
crates/ty_module_resolver/src/path.rs:483
↓ 14 callers
Method
find
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
↓ 14 callers
Method
first_declaration
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3284
↓ 14 callers
Method
fix
Returns the fix for this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:377
↓ 14 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/pylint/unreachable.py:13
↓ 14 callers
Method
format
(&self)
crates/ruff_python_formatter/src/expression/mod.rs:496
↓ 14 callers
Method
function
(self)
crates/ty_python_semantic/src/types/enums.rs:95
↓ 14 callers
Method
get
(&self, document_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:350
↓ 14 callers
Method
get
(&self, key: DefinitionNodeKey)
crates/ty_python_core/src/lib.rs:277
↓ 14 callers
Method
get
(&self, index: InternedBindingsId)
crates/ty_python_core/src/use_def.rs:512
↓ 14 callers
Function
hard_line_break
()
crates/ruff_formatter/src/builders.rs:101
↓ 14 callers
Method
has_trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:336
↓ 14 callers
Method
hide_snippet
Set whether or not the snippet on this annotation should be suppressed when rendering. Such annotations are only rendered with their file name and ra
crates/ruff_db/src/diagnostic/mod.rs:879
↓ 14 callers
Method
id
(&self)
crates/ty_wasm/src/lib.rs:943
↓ 14 callers
Method
index
(self)
crates/ty_python_semantic/src/types/constraints.rs:1836
↓ 14 callers
Method
inferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_ide/src/goto.rs:524
↓ 14 callers
Method
is_class_var
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:1793
↓ 14 callers
Method
is_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callers
Method
is_final
Returns whether this class is final.
crates/ty_python_semantic/src/types/class.rs:919
↓ 14 callers
Method
is_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:590
↓ 14 callers
Method
is_load
Return `true` if the reference occurred in a `Load` operation.
crates/ruff_python_semantic/src/reference.rs:41
↓ 14 callers
Method
is_module
(&self)
crates/ruff_python_ast/src/generated.rs:48
↓ 14 callers
Method
is_positional
Returns `true` if this is either a positional-only or standard (positional or keyword) parameter.
crates/ty_python_semantic/src/types/signatures.rs:6283
↓ 14 callers
Method
is_protocol
Return `true` if this class is a protocol class. In an ideal world, perhaps we wouldn't hardcode this knowledge here; instead, we'd just look at the
crates/ty_python_semantic/src/types/class/known.rs:844
↓ 14 callers
Method
is_raw
Return true if this prefix indicates a "raw f-string", e.g. `rf"{bar}"` or `Rf"{bar}"`
crates/ruff_python_ast/src/str_prefix.rs:83
↓ 14 callers
Method
is_typed_dict
Return `true` if this class constitutes a typed dict specification (inherits from `typing.TypedDict` or `typing_extensions.TypedDict`, either directly
crates/ty_python_semantic/src/types/class/static_literal.rs:1118
↓ 14 callers
Method
kind
(&self)
crates/ty_python_core/src/scope.rs:158
↓ 14 callers
Method
kind
(mut self, kind: impl Into<Option<CompletionKind>>)
crates/ty_ide/src/completion.rs:594
↓ 14 callers
Function
known_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints.rs:5339
↓ 14 callers
Method
local_range
Returns the range within this document. Only use `range` when you already have a URI context and this range is guaranteed to be within the same docum
crates/ty_server/src/document/range.rs:33
↓ 14 callers
Method
match_parameters
Match parameters for this constructor method and downstream constructors.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:203
↓ 14 callers
Method
materialized_divergent_fallback
If `self` is a materialized `Divergent` type, returns the concrete type it should behave as: `object` for top-materialized, `Never` for bottom-materia
crates/ty_python_semantic/src/types.rs:2512
↓ 14 callers
Method
mode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:42
↓ 14 callers
Method
name
(&self)
crates/ruff_benchmark/src/lib.rs:66
↓ 14 callers
Method
name
(&self)
crates/ruff_linter/src/registry.rs:386
↓ 14 callers
Method
nodes
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:203
↓ 14 callers
Method
parse_comma_separated_list
Parses a comma separated list of elements where each element is parsed using the given `parse_element` function. The difference between this function
crates/ruff_python_parser/src/parser/mod.rs:788
↓ 14 callers
Method
parse_expression_list
Parses every Python expression. Matches the `expressions` rule in the [Python grammar]. The [`ExpressionContext`] can be used to match the `star_expr
crates/ruff_python_parser/src/parser/expression.rs:151
↓ 14 callers
Method
parse_named_expression_or_higher
Parses every Python expression except unparenthesized tuple. Matches the `named_expression` rule in the [Python grammar]. The [`ExpressionContext`] c
crates/ruff_python_parser/src/parser/expression.rs:178
↓ 14 callers
Method
persist
Applies the pending changes and persists the cache to disk, if it has been changed.
crates/ruff/src/cache.rs:157
↓ 14 callers
Method
prefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:24
↓ 14 callers
Method
print
(&self)
crates/ruff_formatter/src/lib.rs:324
↓ 14 callers
Method
program_environment
(&self)
crates/ty_project/src/db.rs:837
← previous
next →
1,101–1,200 of 31,766, ranked by callers