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_set_comprehension_expression_scope
( &mut self, setcomp: &ast::ExprSetComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8928
↓ 1 callers
Method
infer_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:7834
↓ 1 callers
Method
infer_standalone_statement_impl
(&mut self, standalone_statement: Statement<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6776
↓ 1 callers
Method
infer_starred_expression
( &mut self, starred: &ast::ExprStarred, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:10413
↓ 1 callers
Method
infer_starred_type_expression
(&mut self, starred: &ast::ExprStarred)
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1461
↓ 1 callers
Function
infer_statement_types_impl
( db: &'db dyn Db, statement: StatementInner<'db>, )
crates/ty_python_semantic/src/types/infer.rs:772
↓ 1 callers
Method
infer_string_annotation_expression
Infer the type of a string annotation expression.
crates/ty_python_semantic/src/types/infer/builder/annotation_expression.rs:374
↓ 1 callers
Method
infer_string_literal_expression
( &mut self, literal: &ast::ExprStringLiteral, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7429
↓ 1 callers
Method
infer_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 callers
Method
infer_subscript_expression
( &mut self, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:129
↓ 1 callers
Method
infer_subscript_load_impl
( &mut self, value_ty: Type<'db>, subscript: &ast::ExprSubscript, )
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:199
↓ 1 callers
Method
infer_try_statement
(&mut self, try_statement: &ast::StmtTry)
crates/ty_python_semantic/src/types/infer/builder.rs:2418
↓ 1 callers
Method
infer_tuple_expression
( &mut self, tuple: &ast::ExprTuple, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7566
↓ 1 callers
Method
infer_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:7624
↓ 1 callers
Function
infer_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 callers
Method
infer_type_alias
(&mut self, type_alias: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:2103
↓ 1 callers
Method
infer_type_alias_definition
( &mut self, type_alias: &ast::StmtTypeAlias, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:2339
↓ 1 callers
Method
infer_type_alias_statement
(&mut self, node: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:5425
↓ 1 callers
Method
infer_type_alias_type_params
(&mut self, type_alias: &ast::StmtTypeAlias)
crates/ty_python_semantic/src/types/infer/builder.rs:2090
↓ 1 callers
Method
infer_type_form_call_expression
( &mut self, call_expression: &ast::ExprCall, )
crates/ty_python_semantic/src/types/infer/builder/type_form.rs:135
↓ 1 callers
Method
infer_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 callers
Method
infer_typealiastype_assignment_deferred
Infer the deferred value type of a `TypeAliasType`.
crates/ty_python_semantic/src/types/infer/builder.rs:4312
↓ 1 callers
Method
infer_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:4216
↓ 1 callers
Method
infer_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:418
↓ 1 callers
Method
infer_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:678
↓ 1 callers
Method
infer_typed_dict_expression
( &mut self, dict: &ast::ExprDict, typed_dict: TypedDictType<'db>, tcx: TypeCo
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:328
↓ 1 callers
Method
infer_typevar_deferred
(&mut self, node: &'ast ast::TypeParamTypeVar)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:86
↓ 1 callers
Method
infer_typevar_definition
( &mut self, node: &ast::TypeParamTypeVar, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:35
↓ 1 callers
Method
infer_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:7434
↓ 1 callers
Method
infer_typevartuple_deferred
(&mut self, node: &ast::TypeParamTypeVarTuple)
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:700
↓ 1 callers
Method
infer_typevartuple_definition
( &mut self, node: &ast::TypeParamTypeVarTuple, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:663
↓ 1 callers
Method
infer_unary_expression_type
( &mut self, unary: &ast::ExprUnaryOp, operand_type: Type<'db>, receiver: Opti
crates/ty_python_semantic/src/types/infer/builder.rs:11752
↓ 1 callers
Method
infer_unpacked_assignment_target
( &mut self, target: &ast::Expr, value: &ast::Expr, unpacked: &UnpackResult<'d
crates/ty_python_semantic/src/types/infer/builder.rs:3098
↓ 1 callers
Method
infer_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:1450
↓ 1 callers
Method
infer_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:1344
↓ 1 callers
Method
infer_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:1425
↓ 1 callers
Method
infer_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:1240
↓ 1 callers
Method
infer_while_statement
(&mut self, while_statement: &ast::StmtWhile)
crates/ty_python_semantic/src/types/infer/builder.rs:5537
↓ 1 callers
Method
infer_with_item_definition
( &mut self, with_item: &WithItemDefinitionKind<'db>, definition: Definition<'db>,
crates/ty_python_semantic/src/types/infer/builder.rs:2491
↓ 1 callers
Method
infer_with_statement
(&mut self, with_statement: &ast::StmtWith)
crates/ty_python_semantic/src/types/infer/builder.rs:2458
↓ 1 callers
Function
inferable_typevars_from_tuple
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, instance: &NominalInstanceType<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:238
↓ 1 callers
Function
inferred_parameter_specialization
Given the type arguments inferred from a call's arguments and expected return type, returns the specialization of `generic_context` to apply to parame
crates/ty_python_semantic/src/types/call/bind.rs:6049
↓ 1 callers
Method
inferred_return_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1829
↓ 1 callers
Method
inferred_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:12663
↓ 1 callers
Method
inferred_type_is_assignable_to
( &mut self, bound_typevar: BoundTypeVarIdentity<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/generics.rs:3552
↓ 1 callers
Method
inferred_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:748
↓ 1 callers
Method
inherit_generic_context
Include the class's type variables when inferring a constructor signature.
crates/ty_python_semantic/src/types.rs:1437
↓ 1 callers
Method
inherit_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:1885
↓ 1 callers
Method
inherited_class_var_type
Resolve the value type for a bare `ClassVar` that repeats an inherited qualifier.
crates/ty_python_semantic/src/types/infer/builder.rs:4714
↓ 1 callers
Function
inherited_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 callers
Method
inherited_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:1255
↓ 1 callers
Function
inherited_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:1446
↓ 1 callers
Function
inherited_known_enum_method
Looks up a resolvable method inherited from a known enum class.
crates/ty_python_semantic/src/types/enums.rs:1594
↓ 1 callers
Function
inherited_model_config
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:828
↓ 1 callers
Method
inherited_return_annotation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1917
↓ 1 callers
Function
inherited_user_defined_enum_method
Looks up the first user-defined enum method in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1531
↓ 1 callers
Function
inherited_user_defined_enum_new
Looks up the first user-defined enum member constructor in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1543
↓ 1 callers
Function
inherited_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:1562
↓ 1 callers
Function
inherited_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:1423
↓ 1 callers
Function
inherited_value_annotation
Looks up an inherited `_value_` annotation from parent enum classes in the MRO.
crates/ty_python_semantic/src/types/enums.rs:1413
↓ 1 callers
Method
inherited_with
Combine two base layouts while preserving any definitely present dictionary.
crates/ty_python_semantic/src/types/class/slots.rs:195
↓ 1 callers
Method
inherits_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 callers
Method
inherits_from_explicit_any
Return whether this class directly or indirectly inherits from an explicit `Any` base.
crates/ty_python_semantic/src/types/class.rs:724
↓ 1 callers
Function
init
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:617
↓ 1 callers
Method
init
(self)
crates/ruff_linter/resources/test/fixtures/pylint/bad_dunder_method_name.py:38
↓ 1 callers
Method
init_argument_matches_keyword_variadic
(&self, argument_index: usize)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:313
↓ 1 callers
Method
initialization_options
(&self)
crates/ty_server/src/session.rs:219
↓ 1 callers
Method
initialize
(&mut self, settings: WorkspaceSettings)
crates/ty_server/src/session.rs:1879
↓ 1 callers
Method
initialize
(&mut self, client: &Client)
crates/ty_server/src/server/main_loop.rs:213
↓ 1 callers
Method
initialize
Perform LSP initialization handshake
crates/ty_server/tests/e2e/main.rs:297
↓ 1 callers
Method
initialize
(&mut self, client: &Client)
crates/ruff_server/src/server/main_loop.rs:138
↓ 1 callers
Method
initialize
Perform LSP initialization handshake # Panics If the `initialization_options` cannot be serialized to JSON
crates/ruff_server/tests/e2e/main.rs:247
↓ 1 callers
Method
initialize_async
( self, params: lsp.InitializeParams )
scripts/ty_benchmark/src/benchmark/lsp_client.py:94
↓ 1 callers
Method
initialize_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:723
↓ 1 callers
Function
inlay_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 callers
Function
inlay_hint_kind
(inlay_hint_kind: &InlayHintKind)
crates/ty_server/src/server/api/requests/inlay_hints.rs:100
↓ 1 callers
Function
inlay_hint_label
( inlay_hint_label: &InlayHintLabel, db: &ProjectDatabase, encoding: PositionEncoding, )
crates/ty_server/src/server/api/requests/inlay_hints.rs:107
↓ 1 callers
Function
inlay_hint_return_type
Returns the inferred return type of an unannotated function.
crates/ty_python_semantic/src/types/ide_support.rs:43
↓ 1 callers
Function
inlay_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 callers
Method
inlay_hints
(&self)
crates/ty_server/src/session/settings.rs:67
↓ 1 callers
Function
inlay_hints_for_cell
( server: &mut TestServer, cell_uri: &lsp_types::Uri, range: Range, )
crates/ty_server/tests/e2e/notebook.rs:761
↓ 1 callers
Method
inlay_hints_with_settings
Returns the inlay hints for the given test case with custom settings.
crates/ty_ide/src/inlay_hints.rs:1394
↓ 1 callers
Method
inline_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:3903
↓ 1 callers
Method
inline_snapshot_block
(&self)
crates/mdtest/src/parser.rs:455
↓ 1 callers
Function
inner
( class_def: &ast::StmtClassDef, semantic: &SemanticModel, func: &mut dyn FnMut(&Expr)
crates/ruff_python_semantic/src/analyze/class.rs:40
↓ 1 callers
Function
inner
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:200
↓ 1 callers
Function
inner
()
crates/ty_python_semantic/resources/corpus/30_func_enclosed.py:4
↓ 1 callers
Function
inner
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR202.py:182
↓ 1 callers
Function
inner
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF056.py:70
↓ 1 callers
Function
inner
()
crates/ruff_linter/resources/test/fixtures/pylint/useless_exception_statement.py:64
↓ 1 callers
Function
inner
(expr: &Expr, in_union_context: bool, semantic: &SemanticModel)
crates/ruff_linter/src/rules/refurb/rules/isinstance_type_none.rs:83
↓ 1 callers
Function
inner
(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 callers
Function
inner
(expr: &Expr, elements: &mut Vec<Expr>)
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:375
↓ 1 callers
Method
inner
(&self)
crates/ty_project/src/watch/watcher.rs:155
↓ 1 callers
Function
inner_gen
()
crates/ruff_linter/resources/test/fixtures/pylint/stop_iteration_return.py:60
↓ 1 callers
Method
inner_mut
(&mut self)
crates/ty_project/src/watch/watcher.rs:159
↓ 1 callers
Method
innermost
Return the [`TextRange`] of the innermost f-string at the given offset.
crates/ruff_python_index/src/interpolated_string_ranges.rs:26
↓ 1 callers
Function
inplace_argument
PD002
crates/ruff_linter/src/rules/pandas_vet/rules/inplace_argument.rs:61
↓ 1 callers
Method
insert
Inserts an item if its target is new and returns the target identifier.
crates/ty_ide/src/pytest_test_discovery.rs:108
↓ 1 callers
Method
insert_completed
Inserts a completed item after the caller has checked that `item` is not already cached.
crates/ty_python_semantic/src/types/cyclic.rs:1180
← previous
next →
10,401–10,500 of 31,766, ranked by callers