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
infer_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 callers
Method
infer_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 callers
Method
infer_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 callers
Function
infer_binary_intersection_type_comparison
( context: &InferContext<'db, '_>, intersection: IntersectionType<'db>, op: NonIdentityOperator,
crates/ty_python_semantic/src/types/infer/comparisons.rs:1346
↓ 1 callers
Function
infer_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 callers
Method
infer_boolean_literal_expression
(&self, literal: &ast::ExprBooleanLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7419
↓ 1 callers
Method
infer_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:9650
↓ 1 callers
Method
infer_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 callers
Method
infer_bytes_literal_expression
(&mut self, literal: &ast::ExprBytesLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7452
↓ 1 callers
Method
infer_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 callers
Method
infer_class_body
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:45
↓ 1 callers
Method
infer_class_deferred
( &mut self, definition: Definition<'db>, class: &ast::StmtClassDef, )
crates/ty_python_semantic/src/types/infer/builder/class.rs:488
↓ 1 callers
Method
infer_class_definition
( &mut self, class_node: &ast::StmtClassDef, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/class.rs:104
↓ 1 callers
Method
infer_class_definition_statement
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:100
↓ 1 callers
Method
infer_class_type_params
(&mut self, class: &ast::StmtClassDef)
crates/ty_python_semantic/src/types/infer/builder/class.rs:49
↓ 1 callers
Method
infer_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 callers
Method
infer_comprehension
(&mut self, comprehension: &ast::Comprehension, is_first: bool)
crates/ty_python_semantic/src/types/infer/builder.rs:9003
↓ 1 callers
Method
infer_comprehension_definition
( &mut self, comprehension: &ComprehensionDefinitionKind<'db>, definition: Definition<
crates/ty_python_semantic/src/types/infer/builder.rs:9055
↓ 1 callers
Method
infer_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 callers
Method
infer_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:721
↓ 1 callers
Method
infer_delete_statement
(&mut self, delete: &ast::StmtDelete)
crates/ty_python_semantic/src/types/infer/builder.rs:5655
↓ 1 callers
Method
infer_dict_comprehension_expression_scope
( &mut self, dictcomp: &ast::ExprDictComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8956
↓ 1 callers
Method
infer_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:5413
↓ 1 callers
Method
infer_eager_union_operand
(&mut self, expr: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1257
↓ 1 callers
Method
infer_empty_list_or_set_constructor
( &mut self, collection_class: KnownClass, call_expression: &ast::ExprCall, tc
crates/ty_python_semantic/src/types/infer/builder.rs:9618
↓ 1 callers
Method
infer_enum_mixin_argument
( &mut self, value: &ast::Expr, base_class: KnownClass, )
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:520
↓ 1 callers
Method
infer_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 callers
Method
infer_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 callers
Method
infer_enum_start_argument
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:498
↓ 1 callers
Method
infer_except_handler_definition
( &mut self, except_handler_definition: &ExceptHandlerDefinitionKind, definition: Defi
crates/ty_python_semantic/src/types/infer/builder.rs:2696
↓ 1 callers
Method
infer_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:627
↓ 1 callers
Function
infer_expression_type_impl
(db: &'db dyn Db, input: InferExpression<'db>)
crates/ty_python_semantic/src/types/infer.rs:731
↓ 1 callers
Method
infer_expression_uncached
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6996
↓ 1 callers
Method
infer_expression_with_state
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, state: DeferredExp
crates/ty_python_semantic/src/types/infer/builder.rs:6801
↓ 1 callers
Method
infer_for_statement
(&mut self, for_statement: &ast::StmtFor)
crates/ty_python_semantic/src/types/infer/builder.rs:5454
↓ 1 callers
Method
infer_for_statement_definition
( &mut self, for_stmt: &ForStmtDefinitionKind<'db>, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5488
↓ 1 callers
Method
infer_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:3949
↓ 1 callers
Method
infer_function_annotations
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:768
↓ 1 callers
Method
infer_function_body
(&mut self, function: &'ast ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:164
↓ 1 callers
Method
infer_function_defaults
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:784
↓ 1 callers
Method
infer_function_definition
( &mut self, function: &ast::StmtFunctionDef, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:397
↓ 1 callers
Method
infer_function_definition_statement
(&mut self, function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:393
↓ 1 callers
Method
infer_function_type_params
(&mut self, function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:844
↓ 1 callers
Method
infer_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:777
↓ 1 callers
Method
infer_generator_expression_scope
( &mut self, generator: &ast::ExprGenerator, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8871
↓ 1 callers
Method
infer_global_statement
(&mut self, global: &ast::StmtGlobal)
crates/ty_python_semantic/src/types/infer/builder.rs:5666
↓ 1 callers
Method
infer_if_statement
(&mut self, if_statement: &ast::StmtIf)
crates/ty_python_semantic/src/types/infer/builder.rs:2379
↓ 1 callers
Method
infer_import_definition
( &mut self, alias: &'ast ast::Alias, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/imports.rs:256
↓ 1 callers
Method
infer_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 callers
Method
infer_import_from_statement
(&mut self, import: &ast::StmtImportFrom)
crates/ty_python_semantic/src/types/infer/builder/imports.rs:325
↓ 1 callers
Method
infer_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 callers
Method
infer_import_statement
(&mut self, import: &ast::StmtImport)
crates/ty_python_semantic/src/types/infer/builder/imports.rs:67
↓ 1 callers
Method
infer_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 callers
Method
infer_lambda_body
(&mut self, lambda_expression: &ast::ExprLambda, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:9229
↓ 1 callers
Method
infer_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:1390
↓ 1 callers
Method
infer_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:6989
↓ 1 callers
Function
infer_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:2582
↓ 1 callers
Method
infer_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 callers
Method
infer_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 callers
Method
infer_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 callers
Method
infer_list_comprehension_expression_scope
( &mut self, listcomp: &ast::ExprListComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8900
↓ 1 callers
Function
infer_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 callers
Method
infer_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:2718
↓ 1 callers
Method
infer_map_inner
Infer constraints for a pair already protected by `infer_map_impl`'s recursion guard.
crates/ty_python_semantic/src/types/generics.rs:4191
↓ 1 callers
Method
infer_match_pattern
(&mut self, pattern: &ast::Pattern)
crates/ty_python_semantic/src/types/infer/builder.rs:2940
↓ 1 callers
Method
infer_match_pattern_definition
( &mut self, pattern: &'ast ast::Pattern, predicate: PatternPredicate<'db>, de
crates/ty_python_semantic/src/types/infer/builder.rs:2865
↓ 1 callers
Method
infer_match_statement
(&mut self, match_statement: &ast::StmtMatch)
crates/ty_python_semantic/src/types/infer/builder.rs:2832
↓ 1 callers
Method
infer_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:6836
↓ 1 callers
Method
infer_maybe_standalone_statement
(&mut self, statement: &ast::Stmt)
crates/ty_python_semantic/src/types/infer/builder.rs:6768
↓ 1 callers
Function
infer_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 callers
Method
infer_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:886
↓ 1 callers
Method
infer_module
(&mut self, module: &ast::ModModule)
crates/ty_python_semantic/src/types/infer/builder.rs:2086
↓ 1 callers
Method
infer_name_expression
(&mut self, name: &ast::ExprName)
crates/ty_python_semantic/src/types/infer/builder.rs:11246
↓ 1 callers
Method
infer_named_expression_definition
( &mut self, named: &'ast ast::ExprNamed, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:9139
↓ 1 callers
Method
infer_nested_bindings_definition
( &mut self, nested_bindings_kind: &NestedBindingsDefinitionKind, definition: Definiti
crates/ty_python_semantic/src/types/infer/builder.rs:2759
↓ 1 callers
Method
infer_nested_match_pattern
(&mut self, pattern: &ast::Pattern)
crates/ty_python_semantic/src/types/infer/builder.rs:2989
↓ 1 callers
Method
infer_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 callers
Method
infer_newtype_assignment_deferred
Infer the deferred base type of a NewType.
crates/ty_python_semantic/src/types/infer/builder.rs:4163
↓ 1 callers
Method
infer_newtype_expression
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder.rs:3800
↓ 1 callers
Method
infer_number_literal_expression
(&self, literal: &ast::ExprNumberLiteral)
crates/ty_python_semantic/src/types/infer/builder.rs:7400
↓ 1 callers
Method
infer_parameter
(&mut self, parameter: &ast::Parameter)
crates/ty_python_semantic/src/types/infer/builder/function.rs:1063
↓ 1 callers
Method
infer_parameter_with_default
(&mut self, parameter_with_default: &ast::ParameterWithDefault)
crates/ty_python_semantic/src/types/infer/builder/function.rs:1047
↓ 1 callers
Method
infer_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 callers
Method
infer_parameters
( &mut self, parameters: &ast::Parameters, first_annotation_already_inferred: bool,
crates/ty_python_semantic/src/types/infer/builder/function.rs:924
↓ 1 callers
Method
infer_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 callers
Method
infer_paramspec_deferred
(&mut self, node: &ast::TypeParamParamSpec)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:571
↓ 1 callers
Method
infer_paramspec_definition
( &mut self, node: &ast::TypeParamParamSpec, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:538
↓ 1 callers
Method
infer_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:1319
↓ 1 callers
Method
infer_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 callers
Function
infer_protocol_variance
( db: &'db dyn Db, class: StaticClassLiteral<'db>, typevar: BoundTypeVarIdentity<'db>, declare
crates/ty_python_semantic/src/types/variance/equations.rs:310
↓ 1 callers
Method
infer_raise_statement
(&mut self, raise: &ast::StmtRaise)
crates/ty_python_semantic/src/types/infer/builder.rs:5575
↓ 1 callers
Method
infer_region_deferred
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1522
↓ 1 callers
Method
infer_region_definition
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1351
↓ 1 callers
Method
infer_region_expression
(&mut self, expression: Expression<'db>, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1558
↓ 1 callers
Method
infer_region_function_decorators
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1505
↓ 1 callers
Method
infer_region_scope
(&mut self, scope: ScopeId<'db>, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1195
↓ 1 callers
Method
infer_region_statement
(&mut self, statement: StatementInner<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1347
↓ 1 callers
Method
infer_return_statement
(&mut self, ret: &ast::StmtReturn)
crates/ty_python_semantic/src/types/infer/builder.rs:5610
↓ 1 callers
Method
infer_return_type_annotation
(&mut self, returns: Option<&ast::Expr>)
crates/ty_python_semantic/src/types/infer/builder/function.rs:831
↓ 1 callers
Method
infer_sentinel_expression
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder.rs:3887
← previous
next →
10,301–10,400 of 31,766, ranked by callers