MCPcopy Create free account

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

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

↓ 2 callersMethodinfer_attribute_expression
(&mut self, attribute: &ast::ExprAttribute)
crates/ty_python_semantic/src/types/infer/builder.rs:11679
↓ 2 callersMethodinfer_attribute_load_impl
Infer an attribute load on a known receiver, returning its recovery type if lookup fails.
crates/ty_python_semantic/src/types/infer/builder.rs:11313
↓ 2 callersMethodinfer_augment_assignment
( &mut self, assignment: &ast::StmtAugAssign, )
crates/ty_python_semantic/src/types/infer/builder.rs:5359
↓ 2 callersMethodinfer_await_expression
( &mut self, await_expression: &ast::ExprAwait, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder/awaitable.rs:17
↓ 2 callersMethodinfer_binary_expression
( &mut self, binary: &ast::ExprBinOp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:159
↓ 2 callersMethodinfer_binary_expression_from_types
Evaluate a binary operator whose operands have already been inferred in their type contexts.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:186
↓ 2 callersMethodinfer_boolean_expression
( &mut self, bool_op: &ast::ExprBoolOp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:11985
↓ 2 callersMethodinfer_builtins_type_call
Infer a call to `builtins.type()`. `builtins.type` has two overloads: a single-argument overload (e.g. `type("foo")`, and a 3-argument `type(name, ba
crates/ty_python_semantic/src/types/infer/builder/type_call.rs:29
↓ 2 callersMethodinfer_call_expression
( &mut self, call_expression: &ast::ExprCall, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:9588
↓ 2 callersMethodinfer_call_expression_impl
( &mut self, call_expression: &ast::ExprCall, mut callable_type: Type<'db>, ca
crates/ty_python_semantic/src/types/infer/builder.rs:9695
↓ 2 callersMethodinfer_callable_type
Infer the type of a `Callable[...]` type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2445
↓ 2 callersMethodinfer_callee
Infer a callable expression without introducing new type variable bindings. An assignment such as `items = list[T]()` creates an instance, not a gene
crates/ty_python_semantic/src/types/infer/builder.rs:9602
↓ 2 callersMethodinfer_chained_boolean_types
Computes the output of a chain of (one) boolean operation, consuming as input an iterator of operations and calling the `infer_ty` for each to infer t
crates/ty_python_semantic/src/types/infer/builder.rs:12032
↓ 2 callersMethodinfer_collection_literal_impl
Infer the type of a collection literal expression.
crates/ty_python_semantic/src/types/infer/builder.rs:8105
↓ 2 callersMethodinfer_collection_with_union_context
( &mut self, tcx: TypeContext<'db>, mut infer: impl FnMut(&mut Self, TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:8048
↓ 2 callersMethodinfer_compare_expression
(&mut self, compare: &ast::ExprCompare)
crates/ty_python_semantic/src/types/infer/builder.rs:12122
↓ 2 callersMethodinfer_concatenate_special_form
Infer the parameter types represented by a `typing.Concatenate` special form.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:3463
↓ 2 callersMethodinfer_context_expression
Infers the type of a context expression (`with expr`) and returns the target's type Returns [`Type::unknown`] if the context expression doesn't imple
crates/ty_python_semantic/src/types/infer/builder.rs:2525
↓ 2 callersMethodinfer_decorator
(&mut self, decorator: &ast::Decorator)
crates/ty_python_semantic/src/types/infer/builder.rs:5734
↓ 2 callersMethodinfer_dict_comprehension_expression
( &mut self, dictcomp: &ast::ExprDictComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8831
↓ 2 callersMethodinfer_dict_expression
(&mut self, dict: &ast::ExprDict, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7886
↓ 2 callersMethodinfer_eager_union_type_expression
( &mut self, binary: &ast::ExprBinOp, need_runtime_value: bool, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1296
↓ 2 callersMethodinfer_ellipsis_literal_expression
( &mut self, _literal: &ast::ExprEllipsisLiteral, )
crates/ty_python_semantic/src/types/infer/builder.rs:7558
↓ 2 callersMethodinfer_enum_call_expression
( &mut self, call_expr: &ast::ExprCall, definition: Option<Definition<'db>>, b
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:295
↓ 2 callersMethodinfer_exception
(&mut self, node: Option<&ast::Expr>, is_star: bool)
crates/ty_python_semantic/src/types/infer/builder.rs:2551
↓ 2 callersMethodinfer_explicit_class_specialization
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, generic_clas
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:505
↓ 2 callersMethodinfer_explicit_type_alias_type_specialization
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, generic_type
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:566
↓ 2 callersMethodinfer_expression_impl
Infer the type of an expression.
crates/ty_python_semantic/src/types/infer/builder.rs:6946
↓ 2 callersFunctioninfer_expression_type
Infers the type of an expression where the expression might come from another file. Use this over [`infer_expression_types`] if the expression might
crates/ty_python_semantic/src/types/infer.rs:713
↓ 2 callersFunctioninfer_expression_types_impl
( db: &'db dyn Db, input: InferExpression<'db>, )
crates/ty_python_semantic/src/types/infer.rs:649
↓ 2 callersMethodinfer_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:6825
↓ 2 callersMethodinfer_fstring_expression
(&mut self, fstring: &ast::ExprFString)
crates/ty_python_semantic/src/types/infer/builder.rs:7458
↓ 2 callersMethodinfer_function_signature_annotations
Infer an annotated method receiver before the rest of its signature so `Self` can be validated where it occurs, including inside parsed string annotat
crates/ty_python_semantic/src/types/infer/builder/function.rs:859
↓ 2 callersMethodinfer_generator_expression
( &mut self, generator: &ast::ExprGenerator, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8666
↓ 2 callersMethodinfer_if_expression
( &mut self, if_expression: &ast::ExprIf, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:9173
↓ 2 callersMethodinfer_lambda_expression
( &mut self, lambda_expression: &ast::ExprLambda, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:9233
↓ 2 callersFunctioninfer_legacy_type_alias
( db: &'db dyn Db, definition: Definition<'db>, _parameters: Option<crate::types::GenericContext<'
crates/ty_python_semantic/src/types/infer.rs:132
↓ 2 callersMethodinfer_list_comprehension_expression
( &mut self, listcomp: &ast::ExprListComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8753
↓ 2 callersMethodinfer_list_expression
(&mut self, list: &ast::ExprList, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7769
↓ 2 callersMethodinfer_literal_parameter_type
( &mut self, parameters: &'param ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:3197
↓ 2 callersMethodinfer_map_impl
( &mut self, formal: Type<'db>, actual: Type<'db>, polarity: TypeVarVariance,
crates/ty_python_semantic/src/types/generics.rs:4168
↓ 2 callersMethodinfer_name_load
(&mut self, name_node: &ast::ExprName)
crates/ty_python_semantic/src/types/infer/builder.rs:11041
↓ 2 callersMethodinfer_name_load_with_definition
Resolve a name once, retaining its definition for type-alias interpretation.
crates/ty_python_semantic/src/types/infer/builder.rs:11046
↓ 2 callersMethodinfer_named_expression
(&mut self, named: &ast::ExprNamed)
crates/ty_python_semantic/src/types/infer/builder.rs:9123
↓ 2 callersMethodinfer_namedtuple_call_expression
Infer a `typing.NamedTuple(typename, fields)` or `collections.namedtuple(typename, field_names)` call. This method *does not* call `infer_expression`
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:30
↓ 2 callersFunctioninfer_narrowing_constraints
Return the type constraints that `test` would place on `symbol` if true and false. For example, if we have this code: ```python y = 1 if flag else N
crates/ty_python_semantic/src/types/narrow.rs:87
↓ 2 callersMethodinfer_new_class_call
Infer a `types.new_class(name, bases, kwds, exec_body)` call. This method *does not* call `infer_expression` on the object being called; it is assume
crates/ty_python_semantic/src/types/infer/builder/new_class.rs:26
↓ 2 callersMethodinfer_parameter_definition
Check a parameter's annotation and default. When a definition is supplied, record the declared and inferred types of the parameter in the function bod
crates/ty_python_semantic/src/types/infer/builder/function.rs:1098
↓ 2 callersMethodinfer_parameterized_special_form_type_expression
( &mut self, subscript: &ast::ExprSubscript, special_form: SpecialFormType, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2564
↓ 2 callersMethodinfer_paramspec_default
( &mut self, default_expr: &ast::Expr, paramspec_name: Option<&str>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:587
↓ 2 callersFunctioninfer_predicate_truthiness
A loop predicate can depend on bindings it guards in the previous iteration. Evaluate it in the caller's query to keep an extra query out of that cycl
crates/ty_python_semantic/src/types/infer.rs:588
↓ 2 callersFunctioninfer_rich_comparison
Rich comparison in Python are the operators `==`, `!=`, `<`, `<=`, `>`, and `>=`. Their behaviour can be edited for classes by implementing correspond
crates/ty_python_semantic/src/types/infer/comparisons.rs:1567
↓ 2 callersFunctioninfer_scope_types_impl
( db: &'db dyn Db, input: InferScope<'db>, )
crates/ty_python_semantic/src/types/infer.rs:544
↓ 2 callersMethodinfer_set_comprehension_expression
( &mut self, setcomp: &ast::ExprSetComp, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8792
↓ 2 callersMethodinfer_set_expression
(&mut self, set: &ast::ExprSet, tcx: TypeContext<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7798
↓ 2 callersMethodinfer_slice_expression
(&mut self, slice: &ast::ExprSlice)
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:1687
↓ 2 callersMethodinfer_standalone_expression_impl
( &mut self, expression: &ast::Expr, standalone_expression: Expression<'db>, t
crates/ty_python_semantic/src/types/infer/builder.rs:6929
↓ 2 callersMethodinfer_statement
(&mut self, statement: &ast::Stmt)
crates/ty_python_semantic/src/types/infer/builder.rs:2291
↓ 2 callersMethodinfer_string_type_expression
Infer the type of a string type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1563
↓ 2 callersMethodinfer_subscript_load
Infer a subscript load, returning its inferred type when the subscription succeeds. If the subscription fails, report the error and return the type t
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:174
↓ 2 callersMethodinfer_subscript_type_expression_no_store
( &mut self, subscript: &ast::ExprSubscript, slice: &ast::Expr, value_ty: Type
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1505
↓ 2 callersMethodinfer_target_impl
( &mut self, target: &ast::Expr, value: &ast::Expr, infer_assigned_ty: Option<
crates/ty_python_semantic/src/types/infer/builder.rs:3492
↓ 2 callersMethodinfer_tstring_expression
(&mut self, tstring: &ast::ExprTString)
crates/ty_python_semantic/src/types/infer/builder.rs:7530
↓ 2 callersMethodinfer_tuple_expression_impl
( &mut self, tuple: &ast::ExprTuple, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7663
↓ 2 callersMethodinfer_typed_dict_constructor_keyword_values
Infer keyword argument values for a `TypedDict` constructor. Named keywords are inferred against the declared type of the matching `TypedDict` field.
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:656
↓ 2 callersMethodinfer_typed_dict_items
( &mut self, dict: &ast::ExprDict, typed_dict: TypedDictType<'db>, tcx: TypeCo
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:340
↓ 2 callersMethodinfer_typeddict_call_expression
Infer a `TypedDict(name, fields)` call expression. This method *does not* call `infer_expression` on the object being called; it is assumed that the
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:73
↓ 2 callersMethodinfer_typeddict_field
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:791
↓ 2 callersMethodinfer_typevartuple_default
( &mut self, default_expr: &ast::Expr, typevartuple_name: Option<&str>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:716
↓ 2 callersMethodinfer_typing_namedtuple_fields
( &mut self, fields_arg: &ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:544
↓ 2 callersMethodinfer_union_subscript_type_expression
( &mut self, subscript: &ast::ExprSubscript, union: UnionType<'db>, operands:
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2374
↓ 2 callersMethodinfer_value_expression_impl
Infer an expression without implicitly treating this root as a `TypeForm`. Child expressions still use their normal contextual inference, so the expr
crates/ty_python_semantic/src/types/infer/builder.rs:7015
↓ 2 callersMethodinfer_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:6847
↓ 2 callersMethodinfer_with_last_context
Infer the value again using the context that succeeded. The earlier inference was only a trial, so its result was not saved.
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:226
↓ 2 callersMethodinfer_with_type_context_fallback
Tries `tcx`, retrying with `fallback_tcx` if inference reports diagnostics other than `allowed_lint`. Only the chosen attempt's types and diagnostics
crates/ty_python_semantic/src/types/infer/builder.rs:6889
↓ 2 callersMethodinfer_yield_expression
(&mut self, yield_expression: &ast::ExprYield)
crates/ty_python_semantic/src/types/infer/builder.rs:10461
↓ 2 callersMethodinfer_yield_from_expression
(&mut self, yield_from: &ast::ExprYieldFrom)
crates/ty_python_semantic/src/types/infer/builder.rs:10514
↓ 2 callersFunctioninferable_typevar_occurrences
Returns the number of occurrences of inferable type variables in the provided type.
crates/ty_python_semantic/src/types/call/bind.rs:8576
↓ 2 callersMethodinference_recovery
( &self, builder: &mut SpecializationBuilder<'db, '_>, errors: Vec<SpecializationError
crates/ty_python_semantic/src/types/call/bind.rs:7384
↓ 2 callersMethodinferred_declaration
( &self, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:1858
↓ 2 callersMethodinferred_lower_satisfies_upper_bound
Check an inferable variable's lower bound against its declared upper bound without restricting caller-fixed variables. For example, if `S <= T`, `T:
crates/ty_python_semantic/src/types/constraints/solutions.rs:820
↓ 2 callersMethodinferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:268
↓ 2 callersFunctioninferred_python_version_source_annotation
Return an annotation for the source from which ty inferred the Python version, when one exists.
crates/ty_python_semantic/src/diagnostic/mod.rs:25
↓ 2 callersMethodinheritance_cycle
Return this class' involvement in an inheritance cycle, if any. A class definition like this will fail at runtime, but we must be resilient to it or
crates/ty_python_semantic/src/types/class/static_literal.rs:3414
↓ 2 callersMethodinherited_frozen_dataclass_dispatch
Determines how an inherited generated frozen-dataclass `method` handles `name`. CPython's generated `__setattr__` and `__delattr__` reject every muta
crates/ty_python_semantic/src/types/class/static_literal.rs:2470
↓ 2 callersMethodinherited_generic_context
Returns the generic context that should be inherited by any constructor methods of this class.
crates/ty_python_semantic/src/types/class/static_literal.rs:600
↓ 2 callersMethodinherited_legacy_generic_context
Returns the generic context that the class inherits from its base classes. Returns `None` if no base class contributes type variables bound to this c
crates/ty_python_semantic/src/types/class/static_literal.rs:476
↓ 2 callersMethodinherited_non_slotted_frozen_dataclass_fields
Returns the inherited fields whose generated `__setattr__` or `__delattr__` still applies.
crates/ty_python_semantic/src/types/class/static_literal.rs:2502
↓ 2 callersFunctioninit_logging
(log_level: LogLevel, log_file: Option<&SystemPath>)
crates/ty_server/src/logging.rs:20
↓ 2 callersFunctioninit_logging
(log_level: LogLevel, log_file: Option<&std::path::Path>)
crates/ruff_server/src/logging.rs:21
↓ 2 callersMethodinitial
Index of entry point to the control flow graph
crates/ruff_python_semantic/src/cfg/graph.rs:26
↓ 2 callersMethodinitialization_result
Get the initialization result
crates/ruff_server/tests/e2e/main.rs:662
↓ 2 callersMethodinitialize
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:220
↓ 2 callersMethodinitialize_finish
Finishes the initialization process with the client, returning an initialized `Connection`.
crates/ruff_server/src/server/connection.rs:35
↓ 2 callersMethodinitialize_start
Starts the initialization process with the client by listening for an initialization request. Returns a request ID that should be passed into `initial
crates/ruff_server/src/server/connection.rs:26
↓ 2 callersMethodinitialize_workspace_folders
Initializes a sequence of workspace folders identified by URI along with its corresponding options. This is meant to be called when a response from a
crates/ty_server/src/session.rs:612
↓ 2 callersFunctioninlay_hint_test_with_options
(source: &str, options: Options)
crates/ty_ide/src/inlay_hints.rs:916
↓ 2 callersFunctioninner
( func: &mut F, semantic: &SemanticModel, expr: &'a Expr, parent: Option<&'a E
crates/ruff_python_semantic/src/analyze/typing.rs:520
↓ 2 callersFunctioninner
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B901.py:49
↓ 2 callersFunctioninner
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP052.py:103
← previousnext →5,901–6,000 of 31,766, ranked by callers