Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 15 callers
Method
source_code
Return the notebook content. This is the concatenation of all Python code cells.
crates/ruff_notebook/src/notebook.rs:372
↓ 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
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:9828
↓ 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:499
↓ 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:1038
↓ 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
↓ 14 callers
Method
access
(&self, mode: ProtocolMemberAccessMode)
crates/ty_python_semantic/src/types/protocol_class.rs:2425
↓ 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
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:577
↓ 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
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:749
↓ 14 callers
Function
class_member
Infer the public type of a class member/symbol (its type as seen from outside its scope) in the given `scope`.
crates/ty_python_semantic/src/types/member.rs:70
↓ 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:250
↓ 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:3021
↓ 14 callers
Method
current_scopes
Returns an iterator over all scopes, starting from the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1550
↓ 14 callers
Method
current_statement_parent
Return the parent [`Stmt`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1482
↓ 14 callers
Method
diagnostic_source
(&self, resolver: &dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1201
↓ 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
enable_workspace_diagnostic_refresh
Enable server-requested refreshes for pull diagnostics.
crates/ty_server/tests/e2e/main.rs:1430
↓ 14 callers
Method
expression
The source text of the expression (e.g., `0x0` in `f"{0x0=}"`).
crates/ruff_python_ast/src/nodes.rs:523
↓ 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:3270
↓ 14 callers
Method
fix
Returns the fix for this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:377
↓ 14 callers
Method
focus_range
Returns the range of the class's name
crates/ty_python_semantic/src/types/class/static_literal.rs:3468
↓ 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:391
↓ 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:908
↓ 14 callers
Method
id
(&self)
crates/ty_wasm/src/lib.rs:943
↓ 14 callers
Method
imports
When set, include the import associated with the completion. Not enabled by default.
crates/ty_ide/src/completion.rs:11676
↓ 14 callers
Method
index
(self)
crates/ty_python_semantic/src/types/constraints.rs:1907
↓ 14 callers
Method
inferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_ide/src/goto.rs:524
↓ 14 callers
Method
intersects
Return true if `self` and `other` contain at least one shared `definition`. A symbol can resolve to multiple definitions (for example, overload group
crates/ty_ide/src/goto.rs:471
↓ 14 callers
Method
is_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callers
Method
is_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:577
↓ 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:6380
↓ 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
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
Method
len
(&self)
crates/ruff_linter/src/noqa.rs:140
↓ 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:2513
↓ 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:55
↓ 14 callers
Method
name
(&self)
crates/ruff_linter/src/registry.rs:386
↓ 14 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
↓ 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:838
↓ 14 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/semantic_model.rs:86
↓ 14 callers
Method
project
(source: &str)
crates/ty_project/src/uv/environments.rs:1230
↓ 14 callers
Method
promote
Promote (possibly nested) literals to types that these literals are instances of. Note that this function tries to promote literals to a more user-fr
crates/ty_python_semantic/src/types.rs:3727
↓ 14 callers
Method
push
(&mut self, constraint: Assignment<ConstraintId>)
crates/ty_python_semantic/src/types/constraints.rs:5092
↓ 14 callers
Method
recursive_type_normalized
Normalize recursive types for cycle recovery when there's no previous value. See [`Type::recursive_type_normalized`] for more details.
crates/ty_python_semantic/src/types/typevar.rs:2315
↓ 14 callers
Method
require_bound_or_constraints
Returns the bounds or constraints of this typevar. If the typevar is unbounded, returns `object` as its upper bound.
crates/ty_python_semantic/src/types/typevar.rs:1141
↓ 14 callers
Function
resolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1833
↓ 14 callers
Method
reverse
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:164
↓ 14 callers
Function
search_paths
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, resolve_mode: ModuleResolveMode
crates/ty_module_resolver/src/resolve.rs:448
↓ 14 callers
Method
set_search_paths
(&mut self, search_paths: SearchPaths)
crates/ty_module_resolver/src/db.rs:64
↓ 14 callers
Method
snapshot
(&self)
crates/ty_ide/src/completion.rs:11722
↓ 14 callers
Function
symlink
()
crates/ty_module_resolver/src/list.rs:495
↓ 14 callers
Method
to_file_path
Returns the corresponding [`AnySystemPath`] for this document key. Note, calling this method on a `DocumentKey::Opaque` representing a cell document
crates/ty_server/src/document.rs:123
↓ 14 callers
Method
trim_whitespace_start
(&self)
crates/ruff_python_trivia/src/whitespace.rs:117
↓ 14 callers
Method
try_add_root
Adds a new root for `path` and returns the root. The root isn't added nor is the file root's kind updated if a root for `path` already exists.
crates/ruff_db/src/files.rs:260
↓ 14 callers
Method
try_bool
Resolves the boolean value of a type. This is used to determine the value that would be returned when `bool(x)` is called on an object `x`. Returns
crates/ty_python_semantic/src/types/bool.rs:41
↓ 14 callers
Method
try_iterate
Given the type of an object that is iterated over in some way, return a tuple spec describing the type of objects that are yielded by that iteration.
crates/ty_python_semantic/src/types/iteration.rs:232
↓ 14 callers
Method
tuple_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:285
↓ 14 callers
Method
unique
(targets: impl IntoIterator<Item = NavigationTarget>)
crates/ty_ide/src/lib.rs:239
↓ 14 callers
Method
upper_bound
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:339
↓ 14 callers
Method
value
Return the numeric value for this [`LineLength`]
crates/ruff_linter/src/line_width.rs:26
↓ 14 callers
Method
with_python_version
(&mut self, version: PythonVersion)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:122
← previous
next →
1,101–1,200 of 31,562, ranked by callers