Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 2 callers
Method
infer_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 callers
Method
infer_target_impl
( &mut self, target: &ast::Expr, value: &ast::Expr, infer_assigned_ty: Option<
crates/ty_python_semantic/src/types/infer/builder.rs:3447
↓ 2 callers
Method
infer_tstring_expression
(&mut self, tstring: &ast::ExprTString)
crates/ty_python_semantic/src/types/infer/builder.rs:7410
↓ 2 callers
Method
infer_tuple_expression_impl
( &mut self, tuple: &ast::ExprTuple, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:7543
↓ 2 callers
Method
infer_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:631
↓ 2 callers
Method
infer_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 callers
Method
infer_typeddict_field
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:766
↓ 2 callers
Method
infer_typevartuple_default
( &mut self, default_expr: &ast::Expr, typevartuple_name: Option<&str>, )
crates/ty_python_semantic/src/types/infer/builder/typevar.rs:716
↓ 2 callers
Method
infer_typing_namedtuple_fields
( &mut self, fields_arg: &ast::Expr, )
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:544
↓ 2 callers
Method
infer_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 callers
Method
infer_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:6895
↓ 2 callers
Method
infer_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:6727
↓ 2 callers
Method
infer_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 callers
Method
infer_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:6769
↓ 2 callers
Method
infer_yield_expression
(&mut self, yield_expression: &ast::ExprYield)
crates/ty_python_semantic/src/types/infer/builder.rs:10320
↓ 2 callers
Method
infer_yield_from_expression
(&mut self, yield_from: &ast::ExprYieldFrom)
crates/ty_python_semantic/src/types/infer/builder.rs:10370
↓ 2 callers
Function
inferable_typevar_occurrences
Returns the number of occurrences of inferable type variables in the provided type.
crates/ty_python_semantic/src/types/call/bind.rs:8459
↓ 2 callers
Method
inference_recovery
( &self, builder: &mut SpecializationBuilder<'db, '_>, errors: Vec<SpecializationError
crates/ty_python_semantic/src/types/call/bind.rs:7269
↓ 2 callers
Method
inferred_declaration
( &self, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:1864
↓ 2 callers
Method
inferred_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:797
↓ 2 callers
Method
inferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:268
↓ 2 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:5963
↓ 2 callers
Function
inferred_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 callers
Method
inheritance_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:3371
↓ 2 callers
Method
inherited_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:2415
↓ 2 callers
Method
inherited_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:601
↓ 2 callers
Method
inherited_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:477
↓ 2 callers
Method
inherited_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:2447
↓ 2 callers
Function
init_logging
(log_level: LogLevel, log_file: Option<&SystemPath>)
crates/ty_server/src/logging.rs:19
↓ 2 callers
Function
init_logging
(log_level: LogLevel, log_file: Option<&std::path::Path>)
crates/ruff_server/src/logging.rs:17
↓ 2 callers
Method
initial
Index of entry point to the control flow graph
crates/ruff_python_semantic/src/cfg/graph.rs:26
↓ 2 callers
Method
initialization_result
Get the initialization result
crates/ruff_server/tests/e2e/main.rs:662
↓ 2 callers
Method
initialize
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:220
↓ 2 callers
Method
initialize_finish
Finishes the initialization process with the client, returning an initialized `Connection`.
crates/ruff_server/src/server/connection.rs:35
↓ 2 callers
Method
initialize_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 callers
Method
initialize_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:609
↓ 2 callers
Function
inlay_hint_test_with_options
(source: &str, options: Options)
crates/ty_ide/src/inlay_hints.rs:916
↓ 2 callers
Function
inner
( func: &mut F, semantic: &SemanticModel, expr: &'a Expr, parent: Option<&'a E
crates/ruff_python_semantic/src/analyze/typing.rs:520
↓ 2 callers
Function
inner
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B901.py:49
↓ 2 callers
Function
inner
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP052.py:103
↓ 2 callers
Method
input
(&self, _file: File)
crates/ruff_linter/src/message/mod.rs:143
↓ 2 callers
Method
input_durability
(&self, default: Durability)
crates/ruff_db/src/files.rs:96
↓ 2 callers
Method
insert
Insert the type into the collection. Returns `true` if the elements was newly added. Returns `false` if the element was already present in the collec
crates/ty_python_semantic/src/types/set_theoretic.rs:848
↓ 2 callers
Method
insert
(&mut self, value: T)
crates/ty_python_semantic/src/types/visitor.rs:403
↓ 2 callers
Method
insert_flags
(&mut self, flags: MemberFlags)
crates/ty_python_core/src/member.rs:69
↓ 2 callers
Method
insert_pending_type_mapping
( &mut self, bound_typevar: BoundTypeVarInstance<'db>, ty: Type<'db>, variance
crates/ty_python_semantic/src/types/generics.rs:3561
↓ 2 callers
Function
install_dependencies_to_cache
Install dependencies into a cached virtual environment. Creates a venv under `target/benchmark_cache/<name>/.venv` and installs the given dependencie
crates/ruff_benchmark/src/real_world_projects.rs:140
↓ 2 callers
Function
instance_attribute_write_is_blocked
Whether or not an attribute write is blocked by the receiver's `__setattr__` method.
crates/ty_python_semantic/src/types/attribute_write.rs:190
↓ 2 callers
Method
instance_flags
Return the properties shared by all instances of this class.
crates/ty_python_semantic/src/types/class.rs:683
↓ 2 callers
Method
instance_layout
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/slots.rs:453
↓ 2 callers
Method
instance_return_specialization
Combine inferred specializations from this constructor and downstream constructors. The resulting specialization can be applied either to the construc
crates/ty_python_semantic/src/types/call/bind/constructor.rs:402
↓ 2 callers
Function
instance_setattr_dispatch
Resolve attribute-specific dispatch through inherited frozen-dataclass setters.
crates/ty_python_semantic/src/types/attribute_write.rs:133
↓ 2 callers
Method
instance_type_for_meta_protocol
Return the constructed type used in meta-protocol matching and inference. There are no constructor arguments here from which to infer the class's typ
crates/ty_python_semantic/src/types/instance.rs:191
↓ 2 callers
Method
intern
Formats `content` into an interned element without writing it to the formatter's buffer.
crates/ruff_formatter/src/formatter.rs:176
↓ 2 callers
Method
intern
Returns the node ID and whether the node was newly inserted.
crates/ty_python_core/src/interned_nodes.rs:60
↓ 2 callers
Method
intern_name
(&mut self, text: &str)
crates/ruff_python_parser/src/parser/mod.rs:429
↓ 2 callers
Method
intern_support
(&mut self, data: Support)
crates/ty_python_semantic/src/types/constraints.rs:1601
↓ 2 callers
Method
interpolated_string_quote_style
Returns the appropriate quoting for interpolated strings by reversing the one used outside of the interpolated string. If the current expression in t
crates/ruff_linter/src/checkers/ast/mod.rs:413
↓ 2 callers
Method
interpreter_layout
(&self)
crates/ty_site_packages/src/lib.rs:2060
↓ 2 callers
Method
intersecting_rev
Returns the indexed values that intersect `query`, in reverse input order. Interval endpoints are treated as inclusive so that an empty diagnostic ra
crates/ty_python_semantic/src/suppression.rs:913
↓ 2 callers
Method
intersection
Retain deprecations only for access kinds deprecated in both alternatives. A non-deprecated getter can suppress read warnings without suppressing writ
crates/ty_python_semantic/src/types.rs:1108
↓ 2 callers
Method
intersection
An intersection can use a non-deprecated member instead, but an absent member cannot provide an alternative implementation.
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:194
↓ 2 callers
Function
intersection_all
Collect all the items from an iterable of slices that are present in all slices.
crates/ruff_macros/src/rule_code_prefix.rs:101
↓ 2 callers
Method
into_annotation
( self, context: &InferContext, target_type_display: impl fmt::Display, ordina
crates/ty_python_semantic/src/types/diagnostic.rs:1973
↓ 2 callers
Method
into_callable_with_receiver
( self, db: &'db dyn Db, receiver: Type<'db>, )
crates/ty_python_semantic/src/types/class.rs:2347
↓ 2 callers
Method
into_constraints
(self)
crates/ty_python_semantic/src/types/narrow.rs:1376
↓ 2 callers
Method
into_constructor_bindings
( mut self, constructor_instance_type: Type<'db>, constructor_kind: ConstructorCallabl
crates/ty_python_semantic/src/types/call/bind.rs:874
↓ 2 callers
Method
into_diagnostics
(self)
crates/ruff_python_parser/tests/fixtures.rs:606
↓ 2 callers
Method
into_diagnostics
(self)
crates/ty_python_semantic/src/types/diagnostic.rs:1712
↓ 2 callers
Method
into_diagnostics
(self)
crates/ruff_linter/src/checkers/ast/mod.rs:3743
↓ 2 callers
Method
into_disjuncts
( self, )
crates/ty_python_semantic/src/types/narrow.rs:1181
↓ 2 callers
Method
into_display_name_type_and_description
Consumes this item and returns its display parts.
crates/ty_ide/src/docstring/document.rs:142
↓ 2 callers
Method
into_edit
Convert this [`Insertion`] into an [`Edit`] that inserts the given content.
crates/ruff_python_importer/src/insertion.rs:298
↓ 2 callers
Method
into_edits
(self)
crates/ruff_linter/src/importer/mod.rs:584
↓ 2 callers
Method
into_errors
(self)
crates/ty_python_semantic/src/types/subscript.rs:256
↓ 2 callers
Method
into_expression_cache_entry
Consume the results already collected by this builder without compacting them.
crates/ty_python_semantic/src/types/infer/builder.rs:12096
↓ 2 callers
Method
into_file_failures
( self, db: &dyn Db, action: &str, clarification: Option<&str>, )
crates/mdtest/src/lib.rs:613
↓ 2 callers
Method
into_flat_symbols
(mut self)
crates/ty_ide/src/symbols.rs:762
↓ 2 callers
Method
into_formatted
(self)
crates/ruff_server/src/format.rs:39
↓ 2 callers
Method
into_function_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:979
↓ 2 callers
Method
into_functools_partial_instance
Reifies this callable as the nominal `functools.partial[T]` instance for its return type.
crates/ty_python_semantic/src/types/callable.rs:939
↓ 2 callers
Method
into_index
Return the Jupyter notebook index, consuming the notebook. The index is built only once when required. This is only used to report diagnostics, so by
crates/ruff_notebook/src/notebook.rs:390
↓ 2 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/set_theoretic.rs:960
↓ 2 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/diagnostic.rs:1739
↓ 2 callers
Method
into_mro_error
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, class: ClassType<'db>,
crates/ty_python_semantic/src/types/mro.rs:842
↓ 2 callers
Method
into_name
(self)
crates/ruff_python_semantic/src/model.rs:3190
↓ 2 callers
Method
into_node_iterator
Consume `self` and return an iterator over the interned nodes.
crates/ty_python_core/src/interned_nodes.rs:42
↓ 2 callers
Method
into_nodes_boxed_slice
Consume `self` and return a boxed slice of the interned nodes.
crates/ty_python_core/src/interned_nodes.rs:47
↓ 2 callers
Method
into_options
(self)
crates/ty_project/src/metadata/configuration_file.rs:76
↓ 2 callers
Method
into_other
(self)
crates/ty_python_semantic/src/types/infer.rs:1525
↓ 2 callers
Method
into_owned
(self, parsed: &ParsedModuleRef)
crates/ty_python_core/src/definition.rs:603
↓ 2 callers
Method
into_paramspec_value
Retain every parameter signature and its generic context, but erase return types that do not participate in a `ParamSpec` specialization.
crates/ty_python_semantic/src/types/callable.rs:922
↓ 2 callers
Method
into_precise_functools_partial_instance
Wraps this reduced callable as a synthetic `functools.partial(...)` instance type.
crates/ty_python_semantic/src/types/callable.rs:949
↓ 2 callers
Method
into_raw_parts
(self)
crates/ruff_python_ast/src/generated.rs:8843
↓ 2 callers
Method
into_renderable_fragments
Consumes this section and returns its fragments when it can be rendered structurally.
crates/ty_ide/src/docstring/document.rs:78
↓ 2 callers
Method
into_reset_action
Consume this block and turn it into a reset action. This occurs when we started collecting a code example from something that looked like a block, bu
crates/ruff_python_formatter/src/string/docstring.rs:1280
↓ 2 callers
Method
into_settings
(self)
crates/ty_server/src/session/options.rs:216
↓ 2 callers
Method
into_sorted
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:187
↓ 2 callers
Method
into_sorted_source_code
Sort a multiline sequence of literal strings that is known to be unsorted. This function panics if it is called and `self.items` has length < 2. It's
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:440
↓ 2 callers
Method
into_utf8_path_buf
(self)
crates/ruff_db/src/system/path.rs:584
← previous
next →
5,901–6,000 of 31,562, ranked by callers