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
↓ 1 callers
Method
allows_file_rename_edits
Returns whether client settings permit import updates for a rename of `path`.
crates/ty_server/src/session.rs:1242
↓ 1 callers
Method
allows_fixed_suffix
(self)
crates/ty_python_semantic/src/types/tuple.rs:1422
↓ 1 callers
Method
allows_styling
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2337
↓ 1 callers
Method
allows_text_overflow
Returns `true` if this mode allows text exceeding the configured line width.
crates/ruff_formatter/src/printer/mod.rs:1643
↓ 1 callers
Method
allows_type_parameters
(self)
crates/ty_python_semantic/src/types/display.rs:117
↓ 1 callers
Function
alternative_formatter
(src, **kwargs)
crates/ruff_linter/resources/test/fixtures/ruff/RUF027_1.py:5
↓ 1 callers
Function
always_breaks
Returns `true` if the body may break via a `break` statement.
crates/ruff_python_semantic/src/analyze/terminal.rs:357
↓ 1 callers
Function
ambiguous_class_name
E742
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_class_name.rs:42
↓ 1 callers
Function
ambiguous_function_name
E743
crates/ruff_linter/src/rules/pycodestyle/rules/ambiguous_function_name.rs:42
↓ 1 callers
Function
ambiguous_unicode_character_comment
RUF003
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:180
↓ 1 callers
Function
ambiguous_unicode_character_string
RUF001, RUF002
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:190
↓ 1 callers
Function
analyze_enum_literal_union_pattern_predicate
Determine the static truthiness of a `match` case over a union of enum literals. The analysis removes enum members already matched by earlier cases w
crates/ty_python_semantic/src/reachability.rs:466
↓ 1 callers
Function
analyze_escape_chars_in_interpolated_string
( flags: AnyStringFlags, elements: &InterpolatedStringElements, locator: &Locator, )
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:224
↓ 1 callers
Function
analyze_graph
( args: AnalyzeGraphCommand, global_options: GlobalConfigArgs, )
crates/ruff/src/lib.rs:224
↓ 1 callers
Function
analyze_non_empty_iterable
(db: &dyn Db, iterable: Expression)
crates/ty_python_semantic/src/reachability.rs:1980
↓ 1 callers
Function
analyze_non_terminal_call
(db: &'db dyn Db, call: CallableAndCallExpr<'db>)
crates/ty_python_semantic/src/reachability.rs:1922
↓ 1 callers
Function
analyze_non_terminal_calls
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, predicates: &IndexSlice<ScopedPredicateId, Predi
crates/ty_python_semantic/src/reachability.rs:697
↓ 1 callers
Method
analyze_overload_returns
Combine return types from an iterator of overloads to determine the effective explicit return type of the constructor call. See `explicit_return_type`
crates/ty_python_semantic/src/types/call/bind/constructor.rs:595
↓ 1 callers
Function
analyze_pattern_predicate
(db: &'db dyn Db, predicate: PatternPredicate<'db>)
crates/ty_python_semantic/src/reachability.rs:530
↓ 1 callers
Function
analyze_single_pattern_predicate_kind
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, predicate_kind: &PatternPredicateKind<'db>,
crates/ty_python_semantic/src/reachability.rs:1736
↓ 1 callers
Method
analyze_successful_class_pattern
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2812
↓ 1 callers
Method
analyze_successful_class_pattern_for_context
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, context: &ClassPatternCon
crates/ty_python_semantic/src/types/narrow.rs:2835
↓ 1 callers
Method
analyze_successful_mapping_pattern
( &mut self, kind: &'pattern MappingPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:3003
↓ 1 callers
Method
analyze_successful_or_pattern
( &mut self, patterns: &'pattern [PatternPredicateKind<'db>], subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2427
↓ 1 callers
Method
analyze_successful_or_pattern_arm
( &mut self, patterns: &'pattern [PatternPredicateKind<'db>], subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2441
↓ 1 callers
Method
analyze_successful_sequence_pattern
Return the subject and binding types of a successful sequence pattern. Each union member is checked against the complete pattern before element types
crates/ty_python_semantic/src/types/narrow.rs:3106
↓ 1 callers
Method
ancestors
Returns an iterator over all [`Scope`] ancestors, starting from the given [`ScopeId`].
crates/ruff_python_semantic/src/scope.rs:285
↓ 1 callers
Method
and_uncached
Compute the conjunction of two interior nodes in ascending ID order after a cache miss.
crates/ty_python_core/src/narrowing_constraints.rs:382
↓ 1 callers
Method
and_uncached
Compute the conjunction on a cache miss with the operands in ascending ID order. The first operand is an interior node and the second can be `AMBIGUOU
crates/ty_python_core/src/reachability_constraints.rs:533
↓ 1 callers
Method
and_with
(mut self, other: Self)
crates/ty_python_semantic/src/types/narrow.rs:778
↓ 1 callers
Function
annotate_imports
( imports: &'a [&'a Stmt], comments: Vec<Comment<'a>>, locator: &Locator<'a>, split_on_trailin
crates/ruff_linter/src/rules/isort/annotate.rs:13
↓ 1 callers
Function
annotated_assignment_default_in_stub
PYI015
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:592
↓ 1 callers
Method
annotation_binding_id
The annotation binding from which this unresolved reference originated, if any.
crates/ruff_python_semantic/src/reference.rs:183
↓ 1 callers
Method
annotation_class
Returns the class whose annotation denotes this numeric-tower union.
crates/ty_python_semantic/src/types/set_theoretic.rs:736
↓ 1 callers
Method
annotation_expression_type
( &self, definition: Definition<'db>, expression: &ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:942
↓ 1 callers
Function
annotation_is_typed_dict_subclass
Returns `true` if `annotation` is a `Name` referencing a class defined in this module whose base-class chain includes `typing.TypedDict`.
crates/ruff_linter/src/rules/airflow/rules/task_implicit_multiple_outputs.rs:219
↓ 1 callers
Function
annotation_is_vendored
(db: &dyn Db, annotation: &Annotation)
crates/ty_ide/src/lib.rs:479
↓ 1 callers
Function
annotation_operator
Returns the special form and source range for the operator at `target` if it is `~`, `&`, or `|` in a location recognized by [`is_in_annotation_expres
crates/ty_ide/src/hover.rs:198
↓ 1 callers
Function
annotation_resolves_to_mapping
Returns `true` if `annotation` (the return type expression) resolves to a subclass of `collections.abc.Mapping`, mirroring Airflow's `_infer_multiple_
crates/ruff_linter/src/rules/airflow/rules/task_implicit_multiple_outputs.rs:173
↓ 1 callers
Function
annotation_to_related_information
Converts an [`Annotation`] to a [`DiagnosticRelatedInformation`].
crates/ty_server/src/server/api/diagnostics.rs:578
↓ 1 callers
Function
annotation_to_related_information
( annotation: &Annotation, context: &LspDiagnosticContext, )
crates/ruff_server/src/lint.rs:526
↓ 1 callers
Function
any_annotated
(class_body: &[Stmt])
crates/ruff_linter/src/rules/ruff/rules/function_call_in_dataclass_default.rs:166
↓ 1 callers
Method
any_enabled
(&self)
crates/ty_ide/src/inlay_hints.rs:404
↓ 1 callers
Function
any_eq_ne_annotation
PYI032
crates/ruff_linter/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs:66
↓ 1 callers
Method
any_formatted
Returns `true` if any of the files require formatting.
crates/ruff/src/commands/format.rs:541
↓ 1 callers
Method
any_invalid
(&self)
crates/ruff_linter/src/suppression.rs:261
↓ 1 callers
Function
any_member_declaration
(class: &ast::StmtClassDef, mut func: F)
crates/ruff_python_semantic/src/analyze/class.rs:167
↓ 1 callers
Method
any_method_available
Returns `true` if any error indicates the subscript method was available.
crates/ty_python_semantic/src/types/subscript.rs:261
↓ 1 callers
Function
any_over_interpolated_string_element
( element: &ast::InterpolatedStringElement, func: &mut dyn FnMut(&Expr) -> bool, )
crates/ruff_python_ast/src/helpers.rs:512
↓ 1 callers
Function
any_over_pattern
(pattern: &Pattern, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:466
↓ 1 callers
Function
any_over_type_param
(type_param: &TypeParam, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:447
↓ 1 callers
Method
any_protocol_members_absent_or_disjoint
( &self, db: &'db dyn Db, protocol: ProtocolInstanceType<'db>, other: Type<'db
crates/ty_python_semantic/src/types/relation.rs:3573
↓ 1 callers
Function
any_stmt_in_body
( body: &[Stmt], func: &mut dyn FnMut(ClassMemberDeclaration) -> bool, boundness: Clas
crates/ruff_python_semantic/src/analyze/class.rs:171
↓ 1 callers
Function
any_super_class
Return `true` if any base class, including the given class, matches an [`ast::StmtClassDef`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:131
↓ 1 callers
Function
any_tuple_has_out_of_bounds_index
Check if any tuple in the union has an out-of-bounds index. If the index is out of bounds for any tuple, we should skip narrowing entirely since a di
crates/ty_python_semantic/src/types/narrow.rs:5707
↓ 1 callers
Method
any_unused
(&self)
crates/ruff_linter/src/suppression.rs:265
↓ 1 callers
Method
append_code
(&mut self, backtick_offsets: BacktickOffsets, new_code: &str)
crates/mdtest/src/parser.rs:396
↓ 1 callers
Function
append_flags
(existing: str | None, additional: str)
scripts/build_ruff_pgo.py:563
↓ 1 callers
Method
append_member
(self, member: &'a str)
crates/ruff_python_ast/src/name.rs:379
↓ 1 callers
Method
append_nest_to_list
(self, key: Key)
crates/ruff_benchmark/resources/tomllib/_parser.py:215
↓ 1 callers
Method
applicable_constraints
( &self, constraint_key: ConstraintKey, enclosing_scope: FileScopeId, expr: Pl
crates/ty_python_core/src/use_def.rs:1141
↓ 1 callers
Method
apply
(self, session: &mut Session, client: &Client)
crates/ty_server/src/session/file_watcher.rs:299
↓ 1 callers
Function
applyFilters
()
docs/js/rule-filters.js:277
↓ 1 callers
Method
apply_argument_index_offset
Applies the given offset to the argument indices in this error, if any. This is mainly used to adjust error argument indices for errors that were gen
crates/ty_python_semantic/src/types/call/bind.rs:10391
↓ 1 callers
Function
apply_class_decorator
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, decorator_ty: Type<'db>, decorated_ty: Type<
crates/ty_python_semantic/src/types/infer/builder/class.rs:519
↓ 1 callers
Method
apply_decorator
Apply a decorator to a function or class type and return the resulting type. Constructor semantics for class-like decorators are handled by `Type::bi
crates/ty_python_semantic/src/types/infer/builder.rs:5688
↓ 1 callers
Function
apply_dependency_metadata
( db: &mut TestDb, file: File, metadata: &Value, )
crates/ty_project/src/uv/environments.rs:938
↓ 1 callers
Method
apply_desugared_decorator
Preserve the descriptor behavior of a transparent callable decorator when it is written as the equivalent assignment form in a class body.
crates/ty_python_semantic/src/types/infer/builder.rs:5658
↓ 1 callers
Function
apply_edit
( session: &mut Session, client: &Client, label: &str, edit: types::WorkspaceEdit, )
crates/ruff_server/src/server/api/requests/execute_command.rs:142
↓ 1 callers
Method
apply_fallbacks
( mut self, origin: ConfigurationOrigin, initial_config_path: &Path, )
crates/ruff_workspace/src/configuration.rs:699
↓ 1 callers
Function
apply_fixes
Apply a series of fixes to `File` and returns the updated source code along with the source map. Returns an error if not all fixes were applied becau
crates/ty_python_semantic/src/fixes.rs:496
↓ 1 callers
Function
apply_generated_type_mixin_member_values
Converts generated functional-enum member values through a known builtin `type=` mixin. This preserves exact `str` literals when the generated auto-v
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:258
↓ 1 callers
Method
apply_generic_context_in_place
( &mut self, db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:739
↓ 1 callers
Method
apply_if_needed
Apply the public-type policy to the raw type.
crates/ty_python_semantic/src/place.rs:95
↓ 1 callers
Function
apply_inlay_hints
(definition: &str, call: &str)
crates/ty_ide/src/inlay_hints.rs:900
↓ 1 callers
Method
apply_self_with_receiver
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, receiver_type: Type<'d
crates/ty_python_semantic/src/types/callable.rs:987
↓ 1 callers
Function
apply_snapshot_filters
(rendered: &str)
crates/mdtest/src/lib.rs:351
↓ 1 callers
Method
apply_specialization
Returns this signature with the given specialization applied to parameters and return type.
crates/ty_python_semantic/src/types/signatures.rs:2176
↓ 1 callers
Method
apply_specialization
( self, db: &'db dyn Db, f: impl FnOnce(GenericContext<'db>) -> Specialization<'db>,
crates/ty_python_semantic/src/types/type_alias.rs:262
↓ 1 callers
Method
apply_specialization_inner
( self, db: &'db dyn Db, specialization: Specialization<'db>, specialize_self_
crates/ty_python_semantic/src/types.rs:9836
↓ 1 callers
Method
apply_specialization_to_bound_or_constraints
Applies a specialization to this occurrence's declared upper bound or constraints, if any.
crates/ty_python_semantic/src/types/typevar.rs:1289
↓ 1 callers
Function
apply_sync_result
Applies a completed synchronization to the existing [`ScriptEnvironment`] input. Stores the returned metadata or initialization error and records the
crates/ty_project/src/uv/environments.rs:735
↓ 1 callers
Method
apply_to
Applies the edit to the given text. Returns: The modified text or None if the edit couldn't be applied
scripts/ty_benchmark/src/benchmark/projects.py:121
↓ 1 callers
Method
apply_type_context
Applies the provided type context to an already inferred type.
crates/ty_python_semantic/src/types/infer/builder.rs:6978
↓ 1 callers
Method
apply_type_mapping_to_bound_or_constraints
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'_, 'db>, visitor: &ApplyT
crates/ty_python_semantic/src/types/typevar.rs:1301
↓ 1 callers
Function
arbitrary_callable
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_0.py:98
↓ 1 callers
Function
arbitrary_core_type
(g: &mut Gen, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:454
↓ 1 callers
Function
arbitrary_optional_name
(g: &mut Gen)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:662
↓ 1 callers
Function
arbitrary_optional_type
(g: &mut Gen, size: u32, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:654
↓ 1 callers
Function
arbitrary_parameter_list
(g: &mut Gen, size: u32, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:590
↓ 1 callers
Function
are_compare_expr_simplifiable
Checks whether two compare expressions are simplifiable
crates/ruff_linter/src/rules/pylint/rules/boolean_chained_comparison.rs:146
↓ 1 callers
Function
are_parameters_parenthesized
Returns `true` if the parameters are parenthesized (as in a function definition), or `false` if not (as in a lambda).
crates/ruff_python_formatter/src/comments/placement.rs:2376
↓ 1 callers
Function
are_with_items_parenthesized
(with: &StmtWith, context: &PyFormatContext)
crates/ruff_python_formatter/src/statement/stmt_with.rs:331
↓ 1 callers
Method
arg_auto
Return the next positional index.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:112
↓ 1 callers
Method
arg_keyword
Return the keyword argument with the given name.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:124
↓ 1 callers
Function
arg_matches_name
Given a positional argument, check if the expression is the "same name" as the function argument itself. This allows us to filter out repetitive inla
crates/ty_ide/src/inlay_hints.rs:660
↓ 1 callers
Method
arg_name
(self)
crates/ruff_linter/src/rules/pylint/rules/self_or_cls_assignment.rs:149
↓ 1 callers
Method
arg_positional
Return the positional argument at the given index.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:119
↓ 1 callers
Method
arg_spec
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:183
↓ 1 callers
Method
args_map
Create a map from argument name to value.
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:230
← previous
next →
7,701–7,800 of 31,562, ranked by callers