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
↓ 2 callers
Method
as_str
(&self)
crates/ruff_formatter/src/printer/printer_options/mod.rs:135
↓ 2 callers
Method
as_str
(&self)
crates/ruff_linter/src/settings/types.rs:691
↓ 2 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/refurb/rules/slice_to_remove_prefix_or_suffix.rs:483
↓ 2 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:373
↓ 2 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_set.rs:146
↓ 2 callers
Function
as_substr
Given an original string like `AACC`, and a suggestion like `AABBCC`, try to detect the case where a substring of the suggestion is "sandwiched" in th
crates/ruff_annotate_snippets/src/renderer/source_map.rs:813
↓ 2 callers
Method
as_text
(&self)
crates/ty_server/src/session/index.rs:275
↓ 2 callers
Method
as_text_mut
(&mut self)
crates/ty_server/src/session/index.rs:282
↓ 2 callers
Method
as_u128
(self)
crates/ruff_db/src/file_revision.rs:26
↓ 2 callers
Method
as_u32
Returns the index as a `u32`. or `None` for `NodeIndex::NONE`.
crates/ruff_python_ast/src/node_index.rs:72
↓ 2 callers
Method
as_unannotated_assignment
(&self)
crates/ty_python_core/src/definition.rs:1000
↓ 2 callers
Function
ascii_identifier_prefix_len
Returns the number of leading ASCII identifier-continuation bytes. A table lookup classifies each byte without decoding UTF-8. Fixed-size batches giv
crates/ruff_python_parser/src/lexer.rs:1582
↓ 2 callers
Method
assert_all_formatted
(&self, _source_code: SourceCode)
crates/ruff_python_formatter/src/comments/mod.rs:379
↓ 2 callers
Function
assert_code_action_resolve_unchanged
(server: &mut crate::TestServer, action: &CodeAction)
crates/ruff_server/tests/e2e/code_action.rs:10
↓ 2 callers
Function
assert_conda_precedence
( system: &TestSystem, prefix: &SystemPath, python: &str, )
crates/ty_site_packages/src/lib.rs:2410
↓ 2 callers
Function
assert_const_function_query_was_not_run
( db: &Db, query: Q, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:29
↓ 2 callers
Function
assert_diagnostics
(db: &dyn Db, diagnostics: &[Diagnostic], expected: &[KeyDiagnosticFields])
crates/ruff_benchmark/benches/ty.rs:189
↓ 2 callers
Function
assert_excludes
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:372
↓ 2 callers
Function
assert_params
( db: &'db dyn Db, signature: &Signature<'db>, expected: &[Parameter<'db>], )
crates/ty_python_semantic/src/types/signatures.rs:6760
↓ 2 callers
Function
assert_python_version
(workspace: &Workspace, file: &ty_wasm::FileHandle, minor: u8)
crates/ty_wasm/tests/api.rs:191
↓ 2 callers
Function
assert_rules_safety
( table: &FixSafetyTable, assertions: &[(&str, Applicability, Applicability)], )
crates/ruff_linter/src/settings/fix_safety_table.rs:182
↓ 2 callers
Method
assert_syntax_error_counts_do_not_increase
(&mut self, source: &str)
crates/ty_ide/src/inlay_hints.rs:1348
↓ 2 callers
Method
assert_work_done_progress
( &mut self, expected_title: &str, )
crates/ty_server/tests/e2e/main.rs:656
↓ 2 callers
Function
assign_argument_separator_comment_placement
Locates positional only parameters separator `/` or the keywords only parameters separator `*` comments. ```python def test( a, # Positional only par
crates/ruff_python_formatter/src/other/parameters.rs:549
↓ 2 callers
Function
assignable_solutions_impl
( db: &'db dyn Db, program: Program<'db>, source: Type<'db>, target: Type<'db>, inferable:
crates/ty_python_semantic/src/types/constraints.rs:3685
↓ 2 callers
Method
assignment
(&self)
crates/ty_python_core/src/definition.rs:1550
↓ 2 callers
Function
assignment_declaration_annotation
Locate the annotation that uniquely declares an assignment target's type.
crates/ty_python_semantic/src/types/diagnostic.rs:1994
↓ 2 callers
Function
assignment_diagnostic_range
Return the range of an assignment's value, including any surrounding parentheses.
crates/ty_python_semantic/src/types/diagnostic.rs:2118
↓ 2 callers
Function
assignment_display_settings
( context: &InferContext<'db, '_>, target_type: Type<'db>, value_type: Type<'db>, starred_elem
crates/ty_python_semantic/src/types/diagnostic.rs:2152
↓ 2 callers
Method
assignment_index
(&self, assignment: Assignment<AtomicConstraintId>)
crates/ty_python_semantic/src/types/constraints/paths.rs:545
↓ 2 callers
Function
assignment_targets_from_with_items
( items: &'a [WithItem], dummy_variable_rgx: &'a Regex, )
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:346
↓ 2 callers
Function
assignment_value_node
Return the expression assigned by an ordinary or named assignment.
crates/ty_python_semantic/src/types/diagnostic.rs:2069
↓ 2 callers
Function
assignment_values_for_target
( unpack_target: &ast::Expr, value: &'ast ast::Expr, requested_target: &ast::Expr, )
crates/ty_python_semantic/src/types/unpacker.rs:497
↓ 2 callers
Function
async_gen
()
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C419.py:65
↓ 2 callers
Function
asyncio_dangling_task
RUF006
crates/ruff_linter/src/rules/ruff/rules/asyncio_dangling_task.rs:86
↓ 2 callers
Method
at
Returns the closest root for `path` or `None` if no root contains `path`.
crates/ruff_db/src/files/file_root.rs:100
↓ 2 callers
Function
at_last_top_level_expression_in_cell
Return `true` if the statement containing the current expression is the last top-level expression in the cell. This assumes that the source is a Jupyt
crates/ruff_linter/src/rules/flake8_bugbear/helpers.rs:12
↓ 2 callers
Function
attempt_test
Run a function over an embedded test file, catching any panics that occur in the process. If no panic occurs, the result of the function is returned
crates/mdtest/src/lib.rs:597
↓ 2 callers
Function
attribute_expr
(value: Expr, attribute: &str)
crates/ruff_python_ast/src/name.rs:941
↓ 2 callers
Method
attribute_name_could_match
(&self, name: &str)
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:278
↓ 2 callers
Function
autofix_with_literal
Wraps a literal in `Literal[...]`, preserving its spelling, quotes, and escapes. String annotations retain their original source offsets: `parse_strin
crates/ty_python_semantic/src/types/diagnostic.rs:3349
↓ 2 callers
Method
available_submodule_attributes
Get the submodule attributes we believe to be defined on this module. Note that `ModuleLiteralType` is per-importing-file, so this analysis includes
crates/ty_python_semantic/src/types.rs:12618
↓ 2 callers
Method
await_expression_fix
Suggest awaiting an expression, adding parentheses if its precedence requires them.
crates/ty_python_semantic/src/types/infer/builder/awaitable.rs:143
↓ 2 callers
Function
b
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:144
↓ 2 callers
Method
b
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:247
↓ 2 callers
Method
bake_bound_type_into_overloads
Rewrites overload signatures as if an implicit bound receiver argument had already been consumed, preserving the corresponding source-parameter offset
crates/ty_python_semantic/src/types/call/bind.rs:3619
↓ 2 callers
Method
banned_module_level_imports
(&self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:204
↓ 2 callers
Function
bar
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/lambda.py:847
↓ 2 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI010.py:1
↓ 2 callers
Function
bar
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:47
↓ 2 callers
Method
bar
(self, b: str)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:25
↓ 2 callers
Method
base_settings
(&self)
crates/ruff_workspace/src/resolver.rs:118
↓ 2 callers
Function
baselines
(db: &dyn Db)
crates/ty_project/src/baseline.rs:203
↓ 2 callers
Method
baz
(self, c: bytes)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:26
↓ 2 callers
Method
before_stdlib
Returns indexed paths that precede stdlib in normal typing resolution.
crates/ty_module_resolver/src/resolve.rs:539
↓ 2 callers
Method
begin_active_visit
(&self, db: &'db dyn Db, item: T)
crates/ty_python_semantic/src/types/cyclic.rs:957
↓ 2 callers
Function
benchmark
(bencher: Bencher, layout: Layout, mode: Mode)
crates/ruff_benchmark/benches/ty_ide.rs:459
↓ 2 callers
Function
benchmark_environment
Keep machine-specific user configuration out of benchmark settings.
scripts/ty_benchmark/src/benchmark/__init__.py:20
↓ 2 callers
Method
bind_and_find_all_legacy_typevars
Bind all unbound legacy type variables to the given context and then add all legacy typevars to the provided set.
crates/ty_python_semantic/src/types.rs:10717
↓ 2 callers
Function
bind_attribute
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, owner: ClassType<'db>, receiver: Type<'db>,
crates/ty_python_semantic/src/types/overrides/attributes.rs:253
↓ 2 callers
Function
bind_new_for_override
Resolve `__new__` descriptors and normalize callable objects before binding the constructor's implicit `cls`. This consumes a classmethod's bound `cls
crates/ty_python_semantic/src/types/overrides.rs:1427
↓ 2 callers
Method
bind_unused_self
Binds the `Self` receiver if it is unused in the rest of the signature. This is purely a performance optimization. Eagerly binding the type of `Self`
crates/ty_python_semantic/src/types/signatures.rs:1981
↓ 2 callers
Function
binding
( bound_typevar: BoundTypeVarInstance<'db>, solution: Type<'db>, )
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:76
↓ 2 callers
Function
binding_names
Find the names in a `for` loop target that are assigned to during iteration. ```python for ((), [(a,), [[b]]], c.d, e[f], *[*g]) in h: # ^
crates/ruff_linter/src/rules/refurb/rules/for_loop_writes.rs:118
↓ 2 callers
Function
binding_reachability
( db: &'db dyn Db, use_def: &'map UseDefMap<'db>, binding: &BindingWithConstraints<'map, 'db>, )
crates/ty_python_semantic/src/reachability.rs:2139
↓ 2 callers
Method
binding_type
( &self, owner: Definition<'db>, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:1280
↓ 2 callers
Function
binding_value_type
(db: &'db dyn Db, binding: Definition<'db>)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:269
↓ 2 callers
Method
bindings_at_snapshot
( &self, snapshot: BindingsSnapshotId, )
crates/ty_python_core/src/use_def.rs:1112
↓ 2 callers
Method
binds_named_typevar
( self, db: &'db dyn Db, name: &'db ast::name::Name, )
crates/ty_python_semantic/src/types/generics.rs:996
↓ 2 callers
Method
bit
(&self, node: ast::NodeIndex)
crates/ty_python_core/src/ast_ids.rs:159
↓ 2 callers
Method
block_body_range
Returns a folding range for just the body of a block.
crates/ty_ide/src/folding_range.rs:521
↓ 2 callers
Method
body
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/recursive.rs:315
↓ 2 callers
Method
body
(self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:176
↓ 2 callers
Method
body_before_else
Returns the suite before the else block.
crates/ruff_linter/src/rules/ruff/rules/needless_else.rs:242
↓ 2 callers
Function
body_without_leading_docstring
Returns `body` without its leading docstring statement, if present.
crates/ruff_python_ast/src/helpers.rs:1276
↓ 2 callers
Function
bound_name_replacement
Returns the new bound name if changing the imported name also changes its binding.
crates/ty_ide/src/will_rename.rs:438
↓ 2 callers
Function
bound_typevar
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &'static str, kind: Ty
crates/ty_python_semantic/src/types/typevar.rs:2422
↓ 2 callers
Method
bound_typevar
(&self)
crates/ty_python_semantic/src/types/generics.rs:5091
↓ 2 callers
Method
bound_typevar
(self)
crates/ty_python_semantic/src/types/bound_super.rs:34
↓ 2 callers
Method
bounded_filter_map_positive
Filter-map the positive members and intersect the results. Return `None` if no members map successfully or the intersection exceeds the expansion budg
crates/ty_python_semantic/src/types/set_theoretic.rs:1316
↓ 2 callers
Method
bracket_text
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/whitespace_before_parameters.rs:36
↓ 2 callers
Method
branch_id
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/nodes.rs:58
↓ 2 callers
Method
build
(&mut self)
crates/ruff_db/src/system/walk_directory.rs:139
↓ 2 callers
Method
build
(mut self)
crates/ty_python_semantic/src/place.rs:2189
↓ 2 callers
Method
build
Builds a mock environment, and returns the path to the environment root.
crates/ty_site_packages/src/lib.rs:2481
↓ 2 callers
Function
build_cfg
Returns the control flow graph associated to an array of statements
crates/ruff_python_semantic/src/cfg/graph.rs:7
↓ 2 callers
Function
build_definite_sequence_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, kind: &SequencePatternPredicateKind<'db>, mu
crates/ty_python_semantic/src/types/match_pattern.rs:1418
↓ 2 callers
Method
build_diagnostic_inference_with
Build a diagnostic specialization after the call-wide constraints were unsatisfiable. Each argument relation is solved independently, then its soluti
crates/ty_python_semantic/src/types/generics.rs:2906
↓ 2 callers
Function
build_diagnostics
Convert a sequence of [Codes] into [Diagnostic]s and append them to `diagnostics`.
crates/ruff_linter/src/rules/ruff/rules/redirected_noqa.rs:77
↓ 2 callers
Function
build_exclude_filter
Helper function to build an exclude filter from patterns with proper error handling.
crates/ty_project/src/metadata/options.rs:1397
↓ 2 callers
Function
build_include_filter
Helper function to build an include filter from patterns with proper error handling.
crates/ty_project/src/metadata/options.rs:1311
↓ 2 callers
Method
build_index
Build and return the [`NotebookIndex`]. ## Notes Each cell range includes its synthetic newline separator. Counting the lines in the concatenated so
crates/ruff_notebook/src/notebook.rs:348
↓ 2 callers
Method
build_union_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut builder: UnionBuil
crates/ty_python_semantic/src/types/union_type_instance.rs:288
↓ 2 callers
Method
builtin
(mut self, yes: bool)
crates/ty_ide/src/completion.rs:614
↓ 2 callers
Function
builtin_literal_constraint
Return a constraint for comparison with an `int`, `bool`, `str`, or `bytes` literal. For example: ```py x = "B" if random(): x = "C" if x != "C": wh
crates/ty_python_semantic/src/types/equality.rs:972
↓ 2 callers
Function
builtin_tuple_spec
Returns the tuple shape for a specialization of the built-in `tuple` class.
crates/ty_python_semantic/src/types/instance.rs:488
↓ 2 callers
Method
bump_complex
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:468
↓ 2 callers
Method
bump_float
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:461
↓ 2 callers
Method
bump_identifier
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:418
↓ 2 callers
Method
bump_int
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:443
← previous
next →
5,001–5,100 of 31,562, ranked by callers