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
↓ 1 callers
Method
best_failing_overload
Returns the overload which call arguments should be inferred against, if every overload is non-matching.
crates/ty_python_semantic/src/types/call/bind.rs:4727
↓ 1 callers
Function
best_match
Returns the import binding that shares the longest prefix with the `prototype` and is of minimal length amongst these. See also [`rank_matches`].
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:915
↓ 1 callers
Method
between
Creates a [`Replacement`] that describes the `source_range` of `source` to replace with `modified` sliced by `modified_range`.
crates/ruff_server/src/edit/replacement.rs:12
↓ 1 callers
Method
between_alternative_blocks_empty_line
Add an empty line between a function or class and an alternative body. We only insert an empty if we're between suites in a multi-suite statement. In
crates/ruff_python_formatter/src/statement/suite.rs:466
↓ 1 callers
Method
between_operators
Creates a subslice that contains the operands coming after `last_operator` and up to, but not including the `end` operator.
crates/ruff_python_formatter/src/expression/binary_like.rs:570
↓ 1 callers
Function
bidirectional_unicode
PLE2502
crates/ruff_linter/src/rules/pylint/rules/bidirectional_unicode.rs:65
↓ 1 callers
Function
bin_data
creates arrays t1, t2 and a shift such that `dat[i] == t2[t1[i >> shift] << shift + i & mask]`; this allows us to share blocks of length `1 << shift`,
crates/ruff_unicode_names2_generator/src/lib.rs:188
↓ 1 callers
Function
bin_op
Return the name of the `operator` implemented by the given binary expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:404
↓ 1 callers
Method
binary_lower_bound_visits
Count the visits required to validate independent binary choices of lower bounds, e.g. `(A ≤ T or B ≤ T) and (C ≤ T or D ≤ T)`. Each rejected path rep
crates/ty_python_semantic/src/types/constraints/solutions.rs:252
↓ 1 callers
Function
binary_op_exception
PLW0711
crates/ruff_linter/src/rules/pylint/rules/binary_op_exception.rs:69
↓ 1 callers
Method
binary_search_by_start
Performs a binary search to find the index of the **first** token that starts at the given `offset`. Unlike `binary_search_by_key`, this method ensur
crates/ruff_python_ast/src/token/tokens.rs:30
↓ 1 callers
Method
bind
Bind references to this alias's query cycle in a closed inference result. Each bound occurrence retains its arguments and refers to the graph's root n
crates/ty_python_semantic/src/types/recursive.rs:402
↓ 1 callers
Method
bind
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, receiver: Typ
crates/ty_python_semantic/src/types/variance.rs:74
↓ 1 callers
Method
bind_by_keyword
Marks the parameter at `parameter_index` as bound by keyword and records the synthesized default type that should appear in the reduced signature, if
crates/ty_python_semantic/src/types/signatures.rs:904
↓ 1 callers
Method
bind_method_receiver
Binds a method receiver after specializing type variables determined by it and filtering overloads whose explicit receiver annotations are incompatibl
crates/ty_python_semantic/src/types/signatures.rs:491
↓ 1 callers
Method
bind_pep695
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:875
↓ 1 callers
Method
bind_positionally
Marks the parameter at `parameter_index` as consumed by a positional binding.
crates/ty_python_semantic/src/types/signatures.rs:898
↓ 1 callers
Function
bind_type_guard_return_type
( db: &'db dyn Db, scope: ScopeId<'db>, return_ty: Type<'db>, bindings: &Bindings<'db>, ar
crates/ty_python_semantic/src/types/infer/builder/typeguard.rs:10
↓ 1 callers
Method
binding_assigns_alias
( &self, definition: Definition<'db>, alias: ExpressionNodeKey, unbound_is_ter
crates/ty_python_semantic/src/types/narrow.rs:1904
↓ 1 callers
Function
binding_decorator_inconsistencies
Finds binding-affecting decorator inconsistencies across an overload set. `@classmethod` and `@staticmethod` affect the callable shape used for overl
crates/ty_python_semantic/src/types/infer/builder/post_inference/overloaded_function.rs:479
↓ 1 callers
Method
binding_has_reachable_explicit_declaration
(&self, binding: Definition<'a>)
crates/ty_ide/src/references.rs:1052
↓ 1 callers
Method
binding_is_first_assignment_on_some_path
(&self, binding: Definition<'a>)
crates/ty_ide/src/references.rs:1060
↓ 1 callers
Method
binding_sources
Returns every nested binding source and whether it was declared `global`. Use [`Self::visible_binding_sources`] when resolving the binding in a parti
crates/ty_python_core/src/definition.rs:1681
↓ 1 callers
Function
bindings
Run lint rules over the [`Binding`]s.
crates/ruff_linter/src/checkers/ast/analyze/bindings.rs:12
↓ 1 callers
Function
bindings_in_different_forks
( checker: &Checker, shadow: &ShadowedBinding, left: NodeId, right: NodeId, )
crates/ruff_linter/src/rules/pyflakes/rules/redefined_while_unused.rs:325
↓ 1 callers
Function
bindings_in_search_scope
Resolves a request against the fixture exposures in `search_scope`.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1194
↓ 1 callers
Method
bindings_with_receiver
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, recursion_guard: &Acti
crates/ty_python_semantic/src/types.rs:7160
↓ 1 callers
Function
bit_count
FURB161
crates/ruff_linter/src/rules/refurb/rules/bit_count.rs:68
↓ 1 callers
Function
blank_after_summary
D205
crates/ruff_linter/src/rules/pydocstyle/rules/blank_after_summary.rs:75
↓ 1 callers
Function
blank_before_after_class
D203, D204, D211
crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_class.rs:169
↓ 1 callers
Function
blank_before_after_function
D201, D202
crates/ruff_linter/src/rules/pydocstyle/rules/blank_before_after_function.rs:120
↓ 1 callers
Function
blanket_noqa
PGH004
crates/ruff_linter/src/rules/pygrep_hooks/rules/blanket_noqa.rs:79
↓ 1 callers
Function
blanket_type_ignore
PGH003
crates/ruff_linter/src/rules/pygrep_hooks/rules/blanket_type_ignore.rs:57
↓ 1 callers
Function
blanks_and_section_underline
( checker: &Checker, docstring: &Docstring, context: &SectionContext, style: SectionStyle, )
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:1476
↓ 1 callers
Function
blind_except
BLE001
crates/ruff_linter/src/rules/flake8_blind_except/rules/blind_except.rs:101
↓ 1 callers
Method
block_range_starts
Returns the start offsets for a block's full fold and body fold. The first offset marks the line on which we should start the full fold (the actual c
crates/ty_ide/src/folding_range.rs:450
↓ 1 callers
Function
blocking_http_call
ASYNC210
crates/ruff_linter/src/rules/flake8_async/rules/blocking_http_call.rs:74
↓ 1 callers
Function
blocking_http_call_httpx
ASYNC212
crates/ruff_linter/src/rules/flake8_async/rules/blocking_http_call_httpx.rs:97
↓ 1 callers
Function
blocking_input
ASYNC250
crates/ruff_linter/src/rules/flake8_async/rules/blocking_input.rs:48
↓ 1 callers
Function
blocking_open_call
ASYNC230
crates/ruff_linter/src/rules/flake8_async/rules/blocking_open_call.rs:49
↓ 1 callers
Function
blocking_os_path
ASYNC240
crates/ruff_linter/src/rules/flake8_async/rules/blocking_path_methods.rs:81
↓ 1 callers
Function
blocking_process_invocation
ASYNC220, ASYNC221, ASYNC222
crates/ruff_linter/src/rules/flake8_async/rules/blocking_process_invocation.rs:137
↓ 1 callers
Function
blocking_sleep
ASYNC251
crates/ruff_linter/src/rules/flake8_async/rules/blocking_sleep.rs:54
↓ 1 callers
Method
body_1
(self)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B027.py:79
↓ 1 callers
Function
body_has_dict_return
Returns `true` if any return statement in the function body returns an inline dict literal, a dict comprehension, or a `dict(...)` call.
crates/ruff_linter/src/rules/airflow/rules/task_implicit_multiple_outputs.rs:243
↓ 1 callers
Function
body_is_no_op
Whether `body` contains only one `pass` or `...` statement.
crates/ruff_linter/src/rules/ruff/rules/needless_else.rs:81
↓ 1 callers
Method
body_kind
Returns the [`FunctionBodyKind`] of this function. For functions without an implementation (e.g., overloaded functions), returns [`FunctionBodyKind::
crates/ty_python_semantic/src/types/function.rs:1088
↓ 1 callers
Function
body_may_skip_else
Whether `body` contains a `break`, `return`, or `raise` that would cause the enclosing loop's `else` clause to be skipped. See [the Python tutorial o
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:122
↓ 1 callers
Function
body_range
Return the [`TextRange`] of an [`IfElifBranch`]'s body (from the end of the test to the end of the body).
crates/ruff_linter/src/rules/flake8_simplify/rules/if_with_same_arms.rs:176
↓ 1 callers
Method
bom_start_offset
(&self)
crates/ruff_source_file/src/line_ranges.rs:349
↓ 1 callers
Function
boolean_chained_comparison
PLR1716
crates/ruff_linter/src/rules/pylint/rules/boolean_chained_comparison.rs:54
↓ 1 callers
Function
boolean_default_value_positional_argument
FBT002
crates/ruff_linter/src/rules/flake8_boolean_trap/rules/boolean_default_value_positional_argument.rs:114
↓ 1 callers
Function
boolean_positional_value_in_call
FBT003
crates/ruff_linter/src/rules/flake8_boolean_trap/rules/boolean_positional_value_in_call.rs:57
↓ 1 callers
Function
boolean_type_hint_positional_argument
FBT001
crates/ruff_linter/src/rules/flake8_boolean_trap/rules/boolean_type_hint_positional_argument.rs:113
↓ 1 callers
Method
bound_depth
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/constraints/variables.rs:657
↓ 1 callers
Method
bound_scope
(&self, enclosing_scope: FileScopeId, symbol: &Symbol)
crates/ty_python_core/src/builder.rs:603
↓ 1 callers
Function
bound_typevar_default_type
( db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:2223
↓ 1 callers
Method
bounded_add_negative
Add a negative element without expanding multiple disjunctions beyond the intersection budget. Returns `None` if the exact result exceeds the budget.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1797
↓ 1 callers
Method
boundness
(&self)
crates/ruff_python_semantic/src/analyze/class.rs:149
↓ 1 callers
Method
branch
Combine two [`Terminal`] operators from different branches.
crates/ruff_python_semantic/src/analyze/terminal.rs:233
↓ 1 callers
Function
branch_python_operator_as_short_circuit
AIR004 (operator form)
crates/ruff_linter/src/rules/airflow/rules/task_branch_as_short_circuit.rs:120
↓ 1 callers
Function
broken
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B901.py:7
↓ 1 callers
Function
btreemap_items_with_same_key
Yield each shared key and its values from both `BTreeMap`s. Take advantage of the fact that keys are sorted to walk through each map once without doin
crates/ty_python_semantic/src/types/typed_dict.rs:3372
↓ 1 callers
Method
build
Builds the [`ModuleGlobSet`] from the added patterns. # Errors Returns an error if the regex set fails to compile.
crates/ty_module_resolver/src/module_glob.rs:187
↓ 1 callers
Method
build
(&mut self)
crates/ruff_workspace/src/resolver.rs:623
↓ 1 callers
Function
build_cargo_publish_command
Build the `cargo publish` command for all not-yet-published workspace crates.
scripts/publish-crates.py:121
↓ 1 callers
Method
build_command
Build the command with all necessary arguments
crates/ruff_server/src/format.rs:221
↓ 1 callers
Function
build_fix
(decorator: &Decorator, annotation_is_mapping: bool, checker: &Checker)
crates/ruff_linter/src/rules/airflow/rules/task_implicit_multiple_outputs.rs:258
↓ 1 callers
Function
build_fstring
Build an f-string consisting of `joinees` joined by `joiner` with `flags`.
crates/ruff_linter/src/rules/flynt/rules/static_join_to_fstring.rs:74
↓ 1 callers
Function
build_intersection_simplify_split_bool_impl
(db: &TestDb, t_splitter: Type)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:3184
↓ 1 callers
Function
build_job
(jobs: Sequence[dict[str, Any]])
scripts/collect_ty_ecosystem_run_metadata.py:221
↓ 1 callers
Function
build_module_glob_set
( db: &dyn Db, patterns: &[RangedValue<String>], option_name: &str, context: AnalysisOptionsCo
crates/ty_project/src/metadata/options.rs:2038
↓ 1 callers
Function
build_suppression_edits_by_diagnostic
( comments: Vec<Option<SuppressionComment>>, locator: &Locator, line_ending: LineEnding, reaso
crates/ruff_linter/src/noqa.rs:871
↓ 1 callers
Function
build_suppression_edits_by_line
( comments: Vec<Option<SuppressionComment<'a>>>, locator: &Locator<'a>, line_ending: LineEnding,
crates/ruff_linter/src/noqa.rs:899
↓ 1 callers
Method
builtin
(self)
crates/ruff_linter/src/rules/pyupgrade/types.rs:29
↓ 1 callers
Function
builtin_argument_shadowing
A002
crates/ruff_linter/src/rules/flake8_builtins/rules/builtin_argument_shadowing.rs:72
↓ 1 callers
Function
builtin_attribute_shadowing
A003
crates/ruff_linter/src/rules/flake8_builtins/rules/builtin_attribute_shadowing.rs:83
↓ 1 callers
Function
builtin_import_shadowing
A004
crates/ruff_linter/src/rules/flake8_builtins/rules/builtin_import_shadowing.rs:59
↓ 1 callers
Function
builtin_lambda_argument_shadowing
A006
crates/ruff_linter/src/rules/flake8_builtins/rules/builtin_lambda_argument_shadowing.rs:39
↓ 1 callers
Function
builtin_literals_equal_to
Return the builtin literal values that compare equal to `literal_type`.
crates/ty_python_semantic/src/types/equality.rs:1040
↓ 1 callers
Function
builtin_modules_on_version
(minor_version: int)
scripts/generate_builtin_modules.py:46
↓ 1 callers
Function
builtin_open
PTH123
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/builtin_open.rs:71
↓ 1 callers
Method
bump_cmp_op
Bump the appropriate token(s) for the given comparison operator.
crates/ruff_python_parser/src/parser/expression.rs:1194
↓ 1 callers
Method
bump_soft_keyword_as_identifier
Bumps the soft keyword token as an `Identifier` token. # Panics If the current token is not a soft keyword.
crates/ruff_python_parser/src/parser/mod.rs:600
↓ 1 callers
Method
bump_string_value
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:476
↓ 1 callers
Method
bump_ts
Bumps the current token assuming it is found in the given token set. # Panics If the current token is not found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:576
↓ 1 callers
Function
byteOffsetToCharOffset
(content: string, byteOffset: number)
playground/ruff/src/Editor/Editor.tsx:335
↓ 1 callers
Function
bytes_has_duplicate_char
(bytes: &ast::BytesLiteralValue)
crates/ruff_linter/src/rules/pylint/rules/bad_str_strip_call.rs:159
↓ 1 callers
Method
bytes_repr
(&'a self, triple_quotes: TripleQuotes)
crates/ruff_python_literal/src/escape.rs:496
↓ 1 callers
Function
bytes_str_func
()
crates/ruff_linter/resources/test/fixtures/flake8_use_pathlib/full_name.py:69
↓ 1 callers
Function
bytestring_attribute
PYI057
crates/ruff_linter/src/rules/flake8_pyi/rules/bytestring_usage.rs:63
↓ 1 callers
Function
bytestring_import
PYI057
crates/ruff_linter/src/rules/flake8_pyi/rules/bytestring_usage.rs:84
↓ 1 callers
Function
c
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:145
↓ 1 callers
Function
c
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF059_0.py:49
↓ 1 callers
Function
c
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B012.py:16
↓ 1 callers
Function
c
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP032_0.py:121
↓ 1 callers
Method
c
(cls)
crates/ruff_linter/resources/test/fixtures/pyupgrade/future_annotations.py:26
↓ 1 callers
Method
cache_dir
(&self)
crates/ty_test/src/db.rs:578
↓ 1 callers
Method
cache_dir
Returns an absolute cache directory on the system. On Linux and macOS, uses `$XDG_CACHE_HOME/ty` or `.cache/ty`. On Windows, uses `C:\Users\User\AppD
crates/ruff_db/src/system/os.rs:161
↓ 1 callers
Method
cache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_cache/src/cache_key.rs:89
← previous
next →
8,101–8,200 of 31,766, ranked by callers