MCPcopy Create free account

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

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

↓ 1 callersMethodinfer_region_deferred
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1511
↓ 1 callersMethodinfer_region_definition
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1340
↓ 1 callersMethodinfer_region_expression
(&mut self, expression: Expression<'db>, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1547
↓ 1 callersMethodinfer_region_function_decorators
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1494
↓ 1 callersMethodinfer_region_scope
(&mut self, scope: ScopeId<'db>, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1184
↓ 1 callersMethodinfer_region_statement
(&mut self, statement: StatementInner<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:1336
↓ 1 callersMethodinfer_return_statement
(&mut self, ret: &ast::StmtReturn)
crates/ty_python_semantic/src/types/infer/builder.rs:5520
↓ 1 callersMethodinfer_return_type_annotation
(&mut self, returns: Option<&ast::Expr>)
crates/ty_python_semantic/src/types/infer/builder/function.rs:833
↓ 1 callersMethodinfer_sentinel_expression
( &mut self, target: &ast::Expr, call_expr: &ast::ExprCall, definition: Defini
crates/ty_python_semantic/src/types/infer/builder.rs:3842
↓ 1 callersMethodinfer_set_comprehension_expression_scope
( &mut self, setcomp: &ast::ExprSetComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8794
↓ 1 callersMethodinfer_set_element
Infers a set element, optionally with a fallback context for an incomplete `TypedDict` key. When normal set element context is available, semantic in
crates/ty_python_semantic/src/types/infer/builder.rs:7715
↓ 1 callersMethodinfer_standalone_statement_impl
(&mut self, standalone_statement: Statement<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6656
↓ 1 callersMethodinfer_starred_expression
( &mut self, starred: &ast::ExprStarred, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:10272
↓ 1 callersMethodinfer_starred_type_expression
(&mut self, starred: &ast::ExprStarred)
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1461
↓ 1 callersFunctioninfer_statement_types_impl
( db: &'db dyn Db, statement: StatementInner<'db>, )
crates/ty_python_semantic/src/types/infer.rs:773
↓ 1 callersMethodinfer_string_annotation_expression
Infer the type of a string annotation expression.
crates/ty_python_semantic/src/types/infer/builder/annotation_expression.rs:371
↓ 1 callersMethodinfer_string_literal_expression
( &mut self, literal: &ast::ExprStringLiteral, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7309
↓ 1 callersMethodinfer_subclass_of_type_expression
Given the slice of a `type[]` annotation, return the type that the annotation represents
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1808
↓ 1 callersMethodinfer_subscript_expression
( &mut self, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:130
↓ 1 callersMethodinfer_subscript_load_impl
( &mut self, value_ty: Type<'db>, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:200
↓ 1 callersMethodinfer_try_statement
(&mut self, try_statement: &ast::StmtTry)
crates/ty_python_semantic/src/types/infer/builder.rs:2398
↓ 1 callersMethodinfer_tuple_expression
( &mut self, tuple: &ast::ExprTuple, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7446
↓ 1 callersMethodinfer_tuple_for_union_member
Infers a tuple literal against one member of its expected union. Returns `None` when the literal cannot match that member. ```python value: tuple[int
crates/ty_python_semantic/src/types/infer/builder.rs:7504
↓ 1 callersFunctioninfer_tuple_rich_comparison
Simulates rich comparison between tuples and returns the inferred result. This performs a lexicographic comparison, returning a union of all possible
crates/ty_python_semantic/src/types/infer/comparisons.rs:1676
↓ 1 callersMethodinfer_type_alias
(&mut self, type_alias: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:2083
↓ 1 callersMethodinfer_type_alias_definition
( &mut self, type_alias: &ast::StmtTypeAlias, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:2319
↓ 1 callersMethodinfer_type_alias_statement
(&mut self, node: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:5335
↓ 1 callersMethodinfer_type_alias_type_params
(&mut self, type_alias: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:2070
↓ 1 callersMethodinfer_type_form_call_expression
( &mut self, call_expression: &ast::ExprCall, )
crates/ty_python_semantic/src/types/infer/builder/type_form.rs:135
↓ 1 callersMethodinfer_type_form_contextual_expression
In a `TypeForm` context, keep the ordinary value interpretation if it is already acceptable. For example, `value` in `x: TypeForm[str] = value` might
crates/ty_python_semantic/src/types/infer/builder/type_form.rs:16
↓ 1 callersMethodinfer_typealiastype_assignment_deferred
Infer the deferred value type of a `TypeAliasType`.
crates/ty_python_semantic/src/types/infer/builder.rs:4267
↓ 1 callersMethodinfer_typealiastype_call
Infer a `TypeAliasType("Name", value)` call in a simple assignment context. Follows the same pattern as [`Self::infer_newtype_expression`]: validates
crates/ty_python_semantic/src/types/infer/builder.rs:4171
↓ 1 callersMethodinfer_typed_dict_constructor
Infers and validates a `TypedDict` constructor through one call-binding pipeline. Bare generic constructors infer from direct keyword arguments. Othe
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:399
↓ 1 callersMethodinfer_typed_dict_constructor_dict_literal_values
Infer the key and value expressions of a positional dict literal passed to a `TypedDict` constructor alongside keyword arguments. The outer dict lite
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:653
↓ 1 callersMethodinfer_typed_dict_expression
( &mut self, dict: &ast::ExprDict, typed_dict: TypedDictType<'db>, item_types:
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:328
↓ 1 callersMethodinfer_typevar_deferred
(&mut self, node: &'ast ast::TypeParamTypeVar)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:86
↓ 1 callersMethodinfer_typevar_definition
( &mut self, node: &ast::TypeParamTypeVar, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:35
↓ 1 callersMethodinfer_typevartuple_argument_constraints
Infers a variadic type variable tuple from every argument matched to `*args`. Comparing the complete argument tuple with the declared tuple preserves
crates/ty_python_semantic/src/types/call/bind.rs:7319
↓ 1 callersMethodinfer_typevartuple_deferred
(&mut self, node: &ast::TypeParamTypeVarTuple)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:700
↓ 1 callersMethodinfer_typevartuple_definition
( &mut self, node: &ast::TypeParamTypeVarTuple, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:663
↓ 1 callersMethodinfer_unary_expression_type
( &mut self, unary: &ast::ExprUnaryOp, operand_type: Type<'db>, receiver: Opti
crates/ty_python_semantic/src/types/infer/builder.rs:11605
↓ 1 callersMethodinfer_unpacked_assignment_target
( &mut self, target: &ast::Expr, value: &ast::Expr, unpacked: &UnpackResult<'d
crates/ty_python_semantic/src/types/infer/builder.rs:3078
↓ 1 callersMethodinfer_variadic_keyword_lambda_parameter_definition
Set initial declared/inferred types for a `**kwargs` keyword-variadic parameter in a lambda expression.
crates/ty_python_semantic/src/types/infer/builder/function.rs:1452
↓ 1 callersMethodinfer_variadic_keyword_parameter_definition
Set initial declared/inferred types for a `**kwargs` keyword-variadic parameter. The annotated type is implicitly wrapped in a string-keyed dictionar
crates/ty_python_semantic/src/types/infer/builder/function.rs:1346
↓ 1 callersMethodinfer_variadic_positional_lambda_parameter_definition
Set initial declared/inferred types for a `*args` variadic positional parameter in a lambda expression.
crates/ty_python_semantic/src/types/infer/builder/function.rs:1427
↓ 1 callersMethodinfer_variadic_positional_parameter_definition
Set initial declared/inferred types for a `*args` variadic positional parameter. The annotated type is implicitly wrapped in a homogeneous tuple. Se
crates/ty_python_semantic/src/types/infer/builder/function.rs:1242
↓ 1 callersMethodinfer_while_statement
(&mut self, while_statement: &ast::StmtWhile)
crates/ty_python_semantic/src/types/infer/builder.rs:5447
↓ 1 callersMethodinfer_with_item_definition
( &mut self, with_item: &WithItemDefinitionKind<'db>, definition: Definition<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:2471
↓ 1 callersMethodinfer_with_statement
(&mut self, with_statement: &ast::StmtWith)
crates/ty_python_semantic/src/types/infer/builder.rs:2438
↓ 1 callersFunctioninferable_typevars_from_tuple
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, instance: &NominalInstanceType<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:238
↓ 1 callersMethodinferred_return_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1829
↓ 1 callersMethodinferred_return_type
Infer the return type of a function body based on the types of expressions in reachable `return` statements.
crates/ty_python_semantic/src/types/infer/builder.rs:12514
↓ 1 callersMethodinferred_type_is_assignable_to
( &mut self, bound_typevar: BoundTypeVarIdentity<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/generics.rs:3531
↓ 1 callersMethodinferred_types_equal_at
Returns `true` if the inferred types are equal for the given set of argument indices.
crates/ty_python_semantic/src/types/call/arguments.rs:733
↓ 1 callersMethodinherit_parent
Inherit py.typed info from the parent package > This marker applies recursively: if a top-level package includes it, > all its sub-packages MUST supp
crates/ty_module_resolver/src/resolve.rs:1840
↓ 1 callersFunctioninherited_conflict_mro
Resolve the static MRO entries for a supported multiple-inheritance join. Return `None` for fewer than two known direct bases, invalid or incompatibl
crates/ty_python_semantic/src/types/overrides.rs:486
↓ 1 callersMethodinherited_dataclass_transformer_params
Returns the nearest `@dataclass_transform` parameters for this class or its MRO. This is used for metaclass-based transforms because `__dataclass_tra
crates/ty_python_semantic/src/types/class/static_literal.rs:1256
↓ 1 callersFunctioninherited_enum_data_type
Find the data type selected for this enum. CPython searches each direct base independently. We only model a selected built-in data type precisely whe
crates/ty_python_semantic/src/types/enums.rs:1443
↓ 1 callersFunctioninherited_known_enum_method
Looks up a resolvable method inherited from a known enum class.
crates/ty_python_semantic/src/types/enums.rs:1591
↓ 1 callersFunctioninherited_model_config
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:771
↓ 1 callersMethodinherited_return_annotation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1917
↓ 1 callersFunctioninherited_user_defined_enum_method
Looks up the first user-defined enum method in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1528
↓ 1 callersFunctioninherited_user_defined_enum_new
Looks up the first user-defined enum member constructor in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1540
↓ 1 callersFunctioninherited_user_defined_mixin_new
Looks up a user-defined `__new__` on a data-type mixin anywhere in the MRO, including through an enum base. When no enum class provides a member cons
crates/ty_python_semantic/src/types/enums.rs:1559
↓ 1 callersFunctioninherited_user_defined_value_annotation
Looks up an inherited `_value_` annotation from user-defined parent enum classes in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1420
↓ 1 callersFunctioninherited_value_annotation
Looks up an inherited `_value_` annotation from parent enum classes in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1410
↓ 1 callersMethodinherited_with
Combine two base layouts while preserving any definitely present dictionary.
crates/ty_python_semantic/src/types/class/slots.rs:195
↓ 1 callersMethodinherits_from_explicit_any
Return whether this instance's class inherits from an explicit `Any` base.
crates/ty_python_semantic/src/types/instance.rs:234
↓ 1 callersMethodinherits_from_explicit_any
Return whether this class directly or indirectly inherits from an explicit `Any` base.
crates/ty_python_semantic/src/types/class.rs:705
↓ 1 callersFunctioninit
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:615
↓ 1 callersMethodinit
(self)
crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py:38
↓ 1 callersMethodinit_argument_matches_keyword_variadic
(&self, argument_index: usize)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:333
↓ 1 callersMethodinitialization_options
(&self)
crates/ty_server/src/session.rs:225
↓ 1 callersMethodinitialize
(&mut self, settings: WorkspaceSettings)
crates/ty_server/src/session.rs:1851
↓ 1 callersMethodinitialize
(&mut self, client: &Client)
crates/ty_server/src/server/main_loop.rs:200
↓ 1 callersMethodinitialize
Perform LSP initialization handshake
crates/ty_server/tests/e2e/main.rs:297
↓ 1 callersMethodinitialize
(&mut self, client: &Client)
crates/ruff_server/src/server/main_loop.rs:138
↓ 1 callersMethodinitialize
Perform LSP initialization handshake # Panics If the `initialization_options` cannot be serialized to JSON
crates/ruff_server/tests/e2e/main.rs:247
↓ 1 callersMethodinitialize_async
( self, params: lsp.InitializeParams )
scripts/ty_benchmark/src/benchmark/lsp_client.py:94
↓ 1 callersMethodinitialize_workspace_folder
Initializes a single workspace folder with the given URI and options. If this workspace folder has already been initialized, then this is a no-op. T
crates/ty_server/src/session.rs:707
↓ 1 callersFunctioninlay_hint_call_argument_details
( db: &'db dyn Db, model: &SemanticModel<'db>, call_expr: &ast::ExprCall, )
crates/ty_python_semantic/src/types/ide_support.rs:1637
↓ 1 callersFunctioninlay_hint_kind
(inlay_hint_kind: &InlayHintKind)
crates/ty_server/src/server/api/requests/inlay_hints.rs:100
↓ 1 callersFunctioninlay_hint_label
( inlay_hint_label: &InlayHintLabel, db: &ProjectDatabase, encoding: PositionEncoding, )
crates/ty_server/src/server/api/requests/inlay_hints.rs:107
↓ 1 callersFunctioninlay_hint_return_type
Returns the inferred return type of an unannotated function.
crates/ty_python_semantic/src/types/ide_support.rs:43
↓ 1 callersFunctioninlay_hint_text_edit
( inlay_hint_text_edit: InlayHintTextEdit, db: &ProjectDatabase, file: File, encoding: Positio
crates/ty_server/src/server/api/requests/inlay_hints.rs:126
↓ 1 callersMethodinlay_hints
(&self)
crates/ty_server/src/session/settings.rs:67
↓ 1 callersFunctioninlay_hints_for_cell
( server: &mut TestServer, cell_uri: &lsp_types::Uri, range: Range, )
crates/ty_server/tests/e2e/notebook.rs:762
↓ 1 callersMethodinlay_hints_with_settings
Returns the inlay hints for the given test case with custom settings.
crates/ty_ide/src/inlay_hints.rs:1394
↓ 1 callersMethodinline_membership_rhs_type
Preserve the precise element types of an immediately consumed list or set literal. A tuple carries the element types into equality-based narrowing, i
crates/ty_python_semantic/src/types/narrow.rs:3901
↓ 1 callersMethodinline_snapshot_block
(&self)
crates/mdtest/src/parser.rs:455
↓ 1 callersFunctioninner
( class_def: &ast::StmtClassDef, semantic: &SemanticModel, func: &mut dyn FnMut(&Expr)
crates/ruff_python_semantic/src/analyze/class.rs:40
↓ 1 callersFunctioninner
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:200
↓ 1 callersFunctioninner
()
crates/ty_python_semantic/resources/corpus/30_func_enclosed.py:4
↓ 1 callersFunctioninner
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR202.py:182
↓ 1 callersFunctioninner
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF056.py:70
↓ 1 callersFunctioninner
()
crates/ruff_linter/resources/test/fixtures/pylint/useless_exception_statement.py:64
↓ 1 callersFunctioninner
(expr: &Expr, in_union_context: bool, semantic: &SemanticModel)
crates/ruff_linter/src/rules/refurb/rules/isinstance_type_none.rs:83
↓ 1 callersFunctioninner
(min_max: MinMax, args: &[Expr], semantic: &SemanticModel, new_args: &mut Vec<Expr>)
crates/ruff_linter/src/rules/pylint/rules/nested_min_max.rs:130
↓ 1 callersFunctioninner
(expr: &Expr, elements: &mut Vec<Expr>)
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:375
↓ 1 callersMethodinner
(&self)
crates/ty_project/src/watch/watcher.rs:155
← previousnext →10,301–10,400 of 31,562, ranked by callers