MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,766 in github.com/astral-sh/ruff

↓ 1 callersFunctionanalyze_non_terminal_calls
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, predicates: &IndexSlice<ScopedPredicateId, Predi
crates/ty_python_semantic/src/reachability.rs:697
↓ 1 callersMethodanalyze_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:575
↓ 1 callersFunctionanalyze_pattern_predicate
(db: &'db dyn Db, predicate: PatternPredicate<'db>)
crates/ty_python_semantic/src/reachability.rs:530
↓ 1 callersFunctionanalyze_single_pattern_predicate_kind
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, predicate_kind: &PatternPredicateKind<'db>,
crates/ty_python_semantic/src/reachability.rs:1736
↓ 1 callersMethodanalyze_successful_class_pattern
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2814
↓ 1 callersMethodanalyze_successful_class_pattern_for_context
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, context: &ClassPatternCon
crates/ty_python_semantic/src/types/narrow.rs:2837
↓ 1 callersMethodanalyze_successful_mapping_pattern
( &mut self, kind: &'pattern MappingPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:3005
↓ 1 callersMethodanalyze_successful_or_pattern
( &mut self, patterns: &'pattern [PatternPredicateKind<'db>], subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2429
↓ 1 callersMethodanalyze_successful_or_pattern_arm
( &mut self, patterns: &'pattern [PatternPredicateKind<'db>], subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2443
↓ 1 callersMethodanalyze_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:3108
↓ 1 callersMethodancestors
Returns an iterator over all [`Scope`] ancestors, starting from the given [`ScopeId`].
crates/ruff_python_semantic/src/scope.rs:285
↓ 1 callersMethodand_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 callersMethodand_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 callersMethodand_with
(mut self, other: Self)
crates/ty_python_semantic/src/types/narrow.rs:780
↓ 1 callersFunctionannotate_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 callersFunctionannotated_assignment_default_in_stub
PYI015
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:592
↓ 1 callersMethodannotation_binding_id
The annotation binding from which this unresolved reference originated, if any.
crates/ruff_python_semantic/src/reference.rs:183
↓ 1 callersMethodannotation_class
Returns the class whose annotation denotes this numeric-tower union.
crates/ty_python_semantic/src/types/set_theoretic.rs:754
↓ 1 callersMethodannotation_expression_type
( &self, definition: Definition<'db>, expression: &ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:942
↓ 1 callersFunctionannotation_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 callersFunctionannotation_is_vendored
(db: &dyn Db, annotation: &Annotation)
crates/ty_ide/src/lib.rs:479
↓ 1 callersFunctionannotation_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 callersFunctionannotation_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 callersFunctionannotation_to_related_information
Converts an [`Annotation`] to a [`DiagnosticRelatedInformation`].
crates/ty_server/src/server/api/diagnostics.rs:569
↓ 1 callersFunctionannotation_to_related_information
( annotation: &Annotation, context: &LspDiagnosticContext, )
crates/ruff_server/src/lint.rs:526
↓ 1 callersFunctionany_annotated
(class_body: &[Stmt])
crates/ruff_linter/src/rules/ruff/rules/function_call_in_dataclass_default.rs:166
↓ 1 callersMethodany_enabled
(&self)
crates/ty_ide/src/inlay_hints.rs:404
↓ 1 callersFunctionany_eq_ne_annotation
PYI032
crates/ruff_linter/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs:66
↓ 1 callersMethodany_formatted
Returns `true` if any of the files require formatting.
crates/ruff/src/commands/format.rs:541
↓ 1 callersMethodany_invalid
(&self)
crates/ruff_linter/src/suppression.rs:261
↓ 1 callersFunctionany_member_declaration
(class: &ast::StmtClassDef, mut func: F)
crates/ruff_python_semantic/src/analyze/class.rs:167
↓ 1 callersMethodany_method_available
Returns `true` if any error indicates the subscript method was available.
crates/ty_python_semantic/src/types/subscript.rs:261
↓ 1 callersFunctionany_over_interpolated_string_element
( element: &ast::InterpolatedStringElement, func: &mut dyn FnMut(&Expr) -> bool, )
crates/ruff_python_ast/src/helpers.rs:512
↓ 1 callersFunctionany_over_pattern
(pattern: &Pattern, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:466
↓ 1 callersFunctionany_over_type_param
(type_param: &TypeParam, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:447
↓ 1 callersMethodany_protocol_members_absent_or_disjoint
( &self, db: &'db dyn Db, protocol: ProtocolInstanceType<'db>, other: Type<'db
crates/ty_python_semantic/src/types/relation.rs:3630
↓ 1 callersFunctionany_stmt_in_body
( body: &[Stmt], func: &mut dyn FnMut(ClassMemberDeclaration) -> bool, boundness: Clas
crates/ruff_python_semantic/src/analyze/class.rs:171
↓ 1 callersFunctionany_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 callersFunctionany_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:5744
↓ 1 callersMethodany_unused
(&self)
crates/ruff_linter/src/suppression.rs:265
↓ 1 callersMethodappend_code
(&mut self, backtick_offsets: BacktickOffsets, new_code: &str)
crates/mdtest/src/parser.rs:396
↓ 1 callersFunctionappend_flags
(existing: str | None, additional: str)
scripts/build_ruff_pgo.py:545
↓ 1 callersMethodappend_member
(self, member: &'a str)
crates/ruff_python_ast/src/name.rs:379
↓ 1 callersMethodappend_nest_to_list
(self, key: Key)
crates/ruff_benchmark/resources/tomllib/_parser.py:215
↓ 1 callersMethodapplicable_constraints
( &self, constraint_key: ConstraintKey, enclosing_scope: FileScopeId, expr: Pl
crates/ty_python_core/src/use_def.rs:1141
↓ 1 callersMethodapply
(self, session: &mut Session, client: &Client)
crates/ty_server/src/session/file_watcher.rs:299
↓ 1 callersFunctionapplyFilters
()
docs/js/rule-filters.js:277
↓ 1 callersMethodapply_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:10578
↓ 1 callersFunctionapply_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:528
↓ 1 callersMethodapply_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:5776
↓ 1 callersFunctionapply_dependency_metadata
( db: &mut TestDb, file: File, metadata: &Value, )
crates/ty_project/src/uv/environments.rs:1105
↓ 1 callersMethodapply_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:5746
↓ 1 callersFunctionapply_edit
( session: &mut Session, client: &Client, label: &str, edit: types::WorkspaceEdit, )
crates/ruff_server/src/server/api/requests/execute_command.rs:142
↓ 1 callersMethodapply_fallbacks
( mut self, origin: ConfigurationOrigin<'_>, initial_config_path: &Path, )
crates/ruff_workspace/src/configuration.rs:664
↓ 1 callersFunctionapply_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:509
↓ 1 callersFunctionapply_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 callersMethodapply_generic_context_in_place
( &mut self, db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:750
↓ 1 callersFunctionapply_inlay_hints
(definition: &str, call: &str)
crates/ty_ide/src/inlay_hints.rs:900
↓ 1 callersMethodapply_requires_python
Applies the `requires-python` constraint to `options`.
crates/ty_project/src/script.rs:386
↓ 1 callersMethodapply_requires_python
Infers the Python version from `requires-python` unless it was configured explicitly.
crates/ty_project/src/metadata/options.rs:170
↓ 1 callersMethodapply_self_with_receiver
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, receiver_type: Type<'d
crates/ty_python_semantic/src/types/callable.rs:985
↓ 1 callersFunctionapply_snapshot_filters
(rendered: &str)
crates/mdtest/src/lib.rs:351
↓ 1 callersMethodapply_specialization
Returns this signature with the given specialization applied to parameters and return type.
crates/ty_python_semantic/src/types/signatures.rs:2156
↓ 1 callersMethodapply_specialization
( self, db: &'db dyn Db, f: impl FnOnce(GenericContext<'db>) -> Specialization<'db>,
crates/ty_python_semantic/src/types/type_alias.rs:265
↓ 1 callersMethodapply_specialization_inner
( self, db: &'db dyn Db, specialization: Specialization<'db>, specialize_self_
crates/ty_python_semantic/src/types.rs:9896
↓ 1 callersMethodapply_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:1337
↓ 1 callersMethodapply_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 callersMethodapply_type_context
Applies the provided type context to an already inferred type.
crates/ty_python_semantic/src/types/infer/builder.rs:7098
↓ 1 callersMethodapply_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:1349
↓ 1 callersFunctionarbitrary_callable
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_0.py:98
↓ 1 callersFunctionarbitrary_core_type
(g: &mut Gen, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:454
↓ 1 callersFunctionarbitrary_optional_name
(g: &mut Gen)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:662
↓ 1 callersFunctionarbitrary_optional_type
(g: &mut Gen, size: u32, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:654
↓ 1 callersFunctionarbitrary_parameter_list
(g: &mut Gen, size: u32, fully_static: bool)
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:590
↓ 1 callersFunctionare_compare_expr_simplifiable
Checks whether two compare expressions are simplifiable
crates/ruff_linter/src/rules/pylint/rules/boolean_chained_comparison.rs:146
↓ 1 callersFunctionare_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 callersFunctionare_with_items_parenthesized
(with: &StmtWith, context: &PyFormatContext)
crates/ruff_python_formatter/src/statement/stmt_with.rs:331
↓ 1 callersMethodarg_auto
Return the next positional index.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:112
↓ 1 callersMethodarg_keyword
Return the keyword argument with the given name.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:124
↓ 1 callersFunctionarg_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 callersMethodarg_name
(self)
crates/ruff_linter/src/rules/pylint/rules/self_or_cls_assignment.rs:149
↓ 1 callersMethodarg_positional
Return the positional argument at the given index.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:119
↓ 1 callersMethodarg_spec
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:183
↓ 1 callersMethodargs_map
Create a map from argument name to value.
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:230
↓ 1 callersFunctionargs_section
(context: &SectionContext)
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:1980
↓ 1 callersFunctionargs_to_fstring_expr
Converts the `sep` and `args` arguments to a [`Expr::FString`]. This function will only return [`None`] if there are no arguments at all. ## Note Th
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:231
↓ 1 callersFunctionargs_to_string_literal_expr
Converts the `sep` and `args` arguments to a [`Expr::StringLiteral`]. This function will return [`None`] if any of the arguments are not string liter
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:172
↓ 1 callersFunctionargument_form_from_binding
Returns the form for a single argument from a binding.
crates/ty_python_semantic/src/types/ide_support.rs:1294
↓ 1 callersMethodargument_matches_keyword_variadic
(&self, argument_index: usize)
crates/ty_python_semantic/src/types/call/bind.rs:3857
↓ 1 callersFunctionargument_simple_defaults
PYI014
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:539
↓ 1 callersMethodargument_type_context
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Constra
crates/ty_python_semantic/src/types/call/bind.rs:9017
↓ 1 callersMethodarguments_for_parameter
( &'a self, call_arguments: &'a CallArguments<'a, 'db>, parameter_index: usize, )
crates/ty_python_semantic/src/types/call/bind.rs:9794
↓ 1 callersMethodas_any
(&self)
crates/ty_test/src/db.rs:602
↓ 1 callersMethodas_any
(&self)
crates/ty_server/src/system.rs:284
↓ 1 callersMethodas_any
(&self)
crates/ruff_db/src/system/test.rs:190
↓ 1 callersMethodas_any_node_ref
Returns the expression as an [`AnyNodeRef`].
crates/ty_python_core/src/unpack.rs:109
↓ 1 callersMethodas_attempt_to_delete_property_with_no_deleter
Returns `Some(property)` if the call error was caused by an attempt to delete a property that has no deleter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:420
↓ 1 callersMethodas_attempt_to_get_property_with_no_getter
Returns `Some(property)` if the call error was caused by an attempt to read a property that has no getter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:384
↓ 1 callersMethodas_attempt_to_set_property_with_no_setter
Returns `Some(property)` if the call error was caused by an attempt to set a property that has no setter, and `None` otherwise.
crates/ty_python_semantic/src/types/call.rs:402
↓ 1 callersMethodas_augmented_assign_operator
(self)
crates/ruff_python_ast/src/token.rs:576
← previousnext →7,801–7,900 of 31,766, ranked by callers