MCPcopy Create free account

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

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

↓ 1 callersMethodinfer_annotation_expression_allow_pep_613
Infer the type of an annotation expression with the given [`DeferredExpressionState`], allowing a PEP 613 `typing.TypeAlias` annotation.
crates/ty_python_semantic/src/types/infer/builder/annotation_expression.rs:62
↓ 1 callersMethodinfer_assert_statement
(&mut self, assert: &ast::StmtAssert)
crates/ty_python_semantic/src/types/infer/builder.rs:5467
↓ 1 callersMethodinfer_assignment_deferred
(&mut self, target: &ast::Expr, value: &'ast ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:3972
↓ 1 callersMethodinfer_assignment_definition
( &mut self, assignment: &AssignmentDefinitionKind<'db>, definition: Definition<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:3551
↓ 1 callersMethodinfer_assignment_definition_impl
( &mut self, assignment: &AssignmentDefinitionKind<'db>, definition: Definition<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:3573
↓ 1 callersMethodinfer_assignment_statement
(&mut self, assignment: &ast::StmtAssign)
crates/ty_python_semantic/src/types/infer/builder.rs:3035
↓ 1 callersMethodinfer_augment_assignment_definition
( &mut self, assignment: &'ast ast::StmtAugAssign, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5257
↓ 1 callersMethodinfer_augmented_assignment_statement
(&mut self, assignment: &ast::StmtAugAssign)
crates/ty_python_semantic/src/types/infer/builder.rs:5071
↓ 1 callersMethodinfer_augmented_op
Infer an augmented operator, returning its recovery type if the operation fails.
crates/ty_python_semantic/src/types/infer/builder.rs:5112
↓ 1 callersMethodinfer_binary_dunder
Collect deprecations from the selected operator methods while reusing cached resolution.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:429
↓ 1 callersMethodinfer_binary_expression_operand_types
Returns a `TypedDict` result when a PEP 584 special case succeeds, otherwise the inferred operand types for ordinary binary inference.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:242
↓ 1 callersMethodinfer_binary_expression_type_impl
( &mut self, node: AnyNodeRef<'_>, left_ty: Type<'db>, right_ty: Type<'db>,
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:470
↓ 1 callersFunctioninfer_binary_intersection_type_comparison
( context: &InferContext<'db, '_>, intersection: IntersectionType<'db>, op: NonIdentityOperator,
crates/ty_python_semantic/src/types/infer/comparisons.rs:1346
↓ 1 callersFunctioninfer_binary_type_comparison
Infers the type of a binary comparison (e.g. 'left == right'). See `TypeInferenceBuilder::infer_compare_expression` for the higher level logic dealing
crates/ty_python_semantic/src/types/infer/comparisons.rs:803
↓ 1 callersMethodinfer_boolean_literal_expression
(&self, literal: &ast::ExprBooleanLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7299
↓ 1 callersMethodinfer_builtin_range_instance_type
Infers a truthiness-refined `range` instance for literal built-in `range(...)` calls. The refinement only records whether the constructed range is st
crates/ty_python_semantic/src/types/infer/builder.rs:9515
↓ 1 callersMethodinfer_builtins_type_deferred
Deferred inference for assigned `type()` calls. Infers the bases argument that was skipped during initial inference to handle forward references and
crates/ty_python_semantic/src/types/infer/builder/type_call.rs:310
↓ 1 callersMethodinfer_bytes_literal_expression
(&mut self, literal: &ast::ExprBytesLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7332
↓ 1 callersMethodinfer_callable_parameter_types
Infer the first argument to a `typing.Callable` type expression and returns the corresponding [`Parameters`]. It returns `None` if the argument is in
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:3324
↓ 1 callersMethodinfer_class_body
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:44
↓ 1 callersMethodinfer_class_deferred
( &mut self, definition: Definition<'db>, class: &ast::StmtClassDef, )
crates/ty_python_semantic/src/types/infer/builder/class.rs:479
↓ 1 callersMethodinfer_class_definition
( &mut self, class_node: &ast::StmtClassDef, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/class.rs:103
↓ 1 callersMethodinfer_class_definition_statement
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:99
↓ 1 callersMethodinfer_class_type_params
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:48
↓ 1 callersMethodinfer_collections_namedtuple_fields
( &mut self, rename_type: Option<Type<'db>>, fields_arg: &ast::Expr, default_t
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:407
↓ 1 callersMethodinfer_comprehension
(&mut self, comprehension: &ast::Comprehension, is_first: bool)
crates/ty_python_semantic/src/types/infer/builder.rs:8869
↓ 1 callersMethodinfer_comprehension_definition
( &mut self, comprehension: &ComprehensionDefinitionKind<'db>, definition: Definition<
crates/ty_python_semantic/src/types/infer/builder.rs:8921
↓ 1 callersMethodinfer_concatenate_tail
Infer the last argument to a `typing.Concatenate` special form, which can be either `...` (for gradual typing), a `ParamSpec` type variable, or a stri
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:3540
↓ 1 callersMethodinfer_dangling_typeddict_spec
Infer the `TypedDictSchema` for an "inlined"/"dangling" functional `TypedDict` definition, such as `class Foo(TypedDict("Bar", {"x": int})): ...`. No
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:696
↓ 1 callersMethodinfer_delete_statement
(&mut self, delete: &ast::StmtDelete)
crates/ty_python_semantic/src/types/infer/builder.rs:5567
↓ 1 callersMethodinfer_dict_comprehension_expression_scope
( &mut self, dictcomp: &ast::ExprDictComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8822
↓ 1 callersMethodinfer_dict_key_assignment_definition
( &mut self, key: &'ast ast::Expr, value: &'ast ast::Expr, assignment: Definit
crates/ty_python_semantic/src/types/infer/builder.rs:5323
↓ 1 callersMethodinfer_eager_union_operand
(&mut self, expr: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1258
↓ 1 callersMethodinfer_empty_list_or_set_constructor
( &mut self, collection_class: KnownClass, call_expression: &ast::ExprCall, tc
crates/ty_python_semantic/src/types/infer/builder.rs:9483
↓ 1 callersMethodinfer_enum_mixin_argument
( &mut self, value: &ast::Expr, base_class: KnownClass, )
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:520
↓ 1 callersMethodinfer_enum_name_argument
( &mut self, name_arg: &ast::Expr, base_class: KnownClass, )
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:470
↓ 1 callersMethodinfer_enum_spec
( &mut self, names_arg: &ast::Expr, start: EnumStart, base_class: KnownClass,
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:573
↓ 1 callersMethodinfer_enum_start_argument
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:498
↓ 1 callersMethodinfer_except_handler_definition
( &mut self, except_handler_definition: &ExceptHandlerDefinitionKind, definition: Defi
crates/ty_python_semantic/src/types/infer/builder.rs:2676
↓ 1 callersMethodinfer_explicit_callable_specialization_impl
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, generic_cont
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:629
↓ 1 callersFunctioninfer_expression_type_impl
(db: &'db dyn Db, input: InferExpression<'db>)
crates/ty_python_semantic/src/types/infer.rs:732
↓ 1 callersMethodinfer_expression_uncached
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6876
↓ 1 callersMethodinfer_expression_with_state
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, state: DeferredExp
crates/ty_python_semantic/src/types/infer/builder.rs:6681
↓ 1 callersMethodinfer_for_statement
(&mut self, for_statement: &ast::StmtFor)
crates/ty_python_semantic/src/types/infer/builder.rs:5364
↓ 1 callersMethodinfer_for_statement_definition
( &mut self, for_stmt: &ForStmtDefinitionKind<'db>, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5398
↓ 1 callersMethodinfer_from_callable_signature
Infer type mappings by comparing formal callable signatures against actual callables. Unsatisfiable relations are recorded in `pending`; only type-va
crates/ty_python_semantic/src/types/generics.rs:3928
↓ 1 callersMethodinfer_function_annotations
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:770
↓ 1 callersMethodinfer_function_body
(&mut self, function: &'ast ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:164
↓ 1 callersMethodinfer_function_defaults
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:786
↓ 1 callersMethodinfer_function_definition
( &mut self, function: &ast::StmtFunctionDef, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:397
↓ 1 callersMethodinfer_function_definition_statement
(&mut self, function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:393
↓ 1 callersMethodinfer_function_type_params
(&mut self, function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:846
↓ 1 callersMethodinfer_functional_typeddict_deferred
Infer field types for functional `TypedDict` assignments in deferred phase, for example: ```python TD = TypedDict("TD", {"x": "TD | None"}, total=Fal
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:752
↓ 1 callersMethodinfer_generator_expression_scope
( &mut self, generator: &ast::ExprGenerator, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8737
↓ 1 callersMethodinfer_global_statement
(&mut self, global: &ast::StmtGlobal)
crates/ty_python_semantic/src/types/infer/builder.rs:5578
↓ 1 callersMethodinfer_if_statement
(&mut self, if_statement: &ast::StmtIf)
crates/ty_python_semantic/src/types/infer/builder.rs:2359
↓ 1 callersMethodinfer_import_definition
( &mut self, alias: &'ast ast::Alias, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/imports.rs:256
↓ 1 callersMethodinfer_import_from_definition
( &mut self, import_from: &ast::StmtImportFrom, alias: &'ast ast::Alias, defin
crates/ty_python_semantic/src/types/infer/builder/imports.rs:470
↓ 1 callersMethodinfer_import_from_statement
(&mut self, import: &ast::StmtImportFrom)
crates/ty_python_semantic/src/types/infer/builder/imports.rs:325
↓ 1 callersMethodinfer_import_from_submodule_definition
Infer the implicit local definition `x = <module 'whatever.thispackage.x'>` that `from .x.y import z` or `from whatever.thispackage.x.y` can introduce
crates/ty_python_semantic/src/types/infer/builder/imports.rs:687
↓ 1 callersMethodinfer_import_statement
(&mut self, import: &ast::StmtImport)
crates/ty_python_semantic/src/types/infer/builder/imports.rs:67
↓ 1 callersMethodinfer_keyword_only_dict_call
( &mut self, func: &ast::Expr, arguments: &ast::Arguments, collection_expr: Op
crates/ty_python_semantic/src/types/infer/builder/dict.rs:13
↓ 1 callersMethodinfer_lambda_body
(&mut self, lambda_expression: &ast::ExprLambda, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:9095
↓ 1 callersMethodinfer_lambda_parameter_definition
Set initial declared type (if annotated) and inferred type for a lambda-parameter symbol, in the lambda body scope.
crates/ty_python_semantic/src/types/infer/builder/function.rs:1392
↓ 1 callersMethodinfer_legacy
TODO: This method should go away once `ParamSpec` and `TypeVarTuple` are migrated to the constraint solver.
crates/ty_python_semantic/src/types/call/bind.rs:6888
↓ 1 callersFunctioninfer_legacy_generic_subscript
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, index: &'db SemanticIndex<'db>, file_scope_i
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:2588
↓ 1 callersMethodinfer_legacy_paramspec
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:1027
↓ 1 callersMethodinfer_legacy_typevar
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:1280
↓ 1 callersMethodinfer_legacy_typevartuple
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:755
↓ 1 callersMethodinfer_list_comprehension_expression_scope
( &mut self, listcomp: &ast::ExprListComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8766
↓ 1 callersFunctioninfer_literal_membership_comparison
Refine membership using the contents of an immediately consumed container display. For sets, assume equality is an equivalence relation and equal obje
crates/ty_python_semantic/src/types/infer/comparisons.rs:751
↓ 1 callersMethodinfer_loop_header_definition
Infer the type for a loop header definition. The loop header sees all the bindings that originate in the loop and are visible at a loop-back edge (ei
crates/ty_python_semantic/src/types/infer/builder.rs:2698
↓ 1 callersMethodinfer_map_inner
Infer constraints for a pair already protected by `infer_map_impl`'s recursion guard.
crates/ty_python_semantic/src/types/generics.rs:4170
↓ 1 callersMethodinfer_match_pattern
(&mut self, pattern: &ast::Pattern)
crates/ty_python_semantic/src/types/infer/builder.rs:2920
↓ 1 callersMethodinfer_match_pattern_definition
( &mut self, pattern: &'ast ast::Pattern, predicate: PatternPredicate<'db>, de
crates/ty_python_semantic/src/types/infer/builder.rs:2845
↓ 1 callersMethodinfer_match_statement
(&mut self, match_statement: &ast::StmtMatch)
crates/ty_python_semantic/src/types/infer/builder.rs:2812
↓ 1 callersMethodinfer_maybe_standalone_expression_with_collection_literal_peer_context
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, peer_ty: Option<Ty
crates/ty_python_semantic/src/types/infer/builder.rs:6716
↓ 1 callersMethodinfer_maybe_standalone_statement
(&mut self, statement: &ast::Stmt)
crates/ty_python_semantic/src/types/infer/builder.rs:6648
↓ 1 callersFunctioninfer_membership_test_comparison
Performs a membership test (`in` and `not in`) between two instances and returns the resulting type, or `None` if the test is unsupported. The behavio
crates/ty_python_semantic/src/types/infer/comparisons.rs:1610
↓ 1 callersMethodinfer_method_receiver_annotation
Infers an explicitly annotated method receiver before the rest of its signature. Returns whether the annotation is incompatible with `Self`, or `None
crates/ty_python_semantic/src/types/infer/builder/function.rs:888
↓ 1 callersMethodinfer_module
(&mut self, module: &ast::ModModule)
crates/ty_python_semantic/src/types/infer/builder.rs:2066
↓ 1 callersMethodinfer_name_expression
(&mut self, name: &ast::ExprName)
crates/ty_python_semantic/src/types/infer/builder.rs:11099
↓ 1 callersMethodinfer_named_expression_definition
( &mut self, named: &'ast ast::ExprNamed, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:9005
↓ 1 callersMethodinfer_nested_bindings_definition
( &mut self, nested_bindings_kind: &NestedBindingsDefinitionKind, definition: Definiti
crates/ty_python_semantic/src/types/infer/builder.rs:2739
↓ 1 callersMethodinfer_nested_match_pattern
(&mut self, pattern: &ast::Pattern)
crates/ty_python_semantic/src/types/infer/builder.rs:2969
↓ 1 callersMethodinfer_new_class_deferred
Deferred inference for assigned `types.new_class()` calls. Infers the bases argument that was skipped during initial inference to handle forward refe
crates/ty_python_semantic/src/types/infer/builder/new_class.rs:199
↓ 1 callersMethodinfer_newtype_assignment_deferred
Infer the deferred base type of a NewType.
crates/ty_python_semantic/src/types/infer/builder.rs:4118
↓ 1 callersMethodinfer_newtype_expression
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder.rs:3755
↓ 1 callersMethodinfer_number_literal_expression
(&self, literal: &ast::ExprNumberLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7280
↓ 1 callersMethodinfer_parameter
(&mut self, parameter: &ast::Parameter)
crates/ty_python_semantic/src/types/infer/builder/function.rs:1065
↓ 1 callersMethodinfer_parameter_with_default
(&mut self, parameter_with_default: &ast::ParameterWithDefault)
crates/ty_python_semantic/src/types/infer/builder/function.rs:1049
↓ 1 callersMethodinfer_parameterized_legacy_typing_alias
( &mut self, subscript_node: &ast::ExprSubscript, alias: LegacyStdlibAlias, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2399
↓ 1 callersMethodinfer_parameters
( &mut self, parameters: &ast::Parameters, first_annotation_already_inferred: bool,
crates/ty_python_semantic/src/types/infer/builder/function.rs:926
↓ 1 callersMethodinfer_paramspec_default_impl
( &mut self, default_expr: &ast::Expr, paramspec_name: Option<&str>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:603
↓ 1 callersMethodinfer_paramspec_deferred
(&mut self, node: &ast::TypeParamParamSpec)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:571
↓ 1 callersMethodinfer_paramspec_definition
( &mut self, node: &ast::TypeParamParamSpec, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:538
↓ 1 callersMethodinfer_paramspec_explicit_specialization_value
Infer the type of the expression that represents an explicit specialization of a `ParamSpec` type variable.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:1325
↓ 1 callersMethodinfer_pep_604_union_type_alias
( &mut self, node: &ast::ExprBinOp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:203
↓ 1 callersFunctioninfer_protocol_variance
( db: &'db dyn Db, class: StaticClassLiteral<'db>, typevar: BoundTypeVarIdentity<'db>, declare
crates/ty_python_semantic/src/types/variance/equations.rs:310
↓ 1 callersMethodinfer_raise_statement
(&mut self, raise: &ast::StmtRaise)
crates/ty_python_semantic/src/types/infer/builder.rs:5485
← previousnext →10,201–10,300 of 31,562, ranked by callers