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
↓ 3 callers
Method
in_multi_statement_line
Return `true` if a [`Stmt`] appears to be part of a multi-statement line.
crates/ruff_python_index/src/indexer.rs:224
↓ 3 callers
Method
in_notebook
(&self)
crates/ruff_python_parser/tests/fixtures.rs:696
↓ 3 callers
Method
in_type_expression
Interpret this special form as an unparameterized type in a type-expression context. This is called for the "misc" special forms that are not aliases
crates/ty_python_semantic/src/types/special_form.rs:814
↓ 3 callers
Method
in_type_params
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:515
↓ 3 callers
Method
inc
(&mut self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:122
↓ 3 callers
Method
includes
(self, provenance: ConstraintProvenance)
crates/ty_python_semantic/src/types/constraints.rs:3379
↓ 3 callers
Method
includes_all
(&self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:148
↓ 3 callers
Method
increment
(self)
crates/ty_python_semantic/src/types/typevar.rs:904
↓ 3 callers
Method
increment_usage_count
Increment the usage count for the group name by the given value. If we're in one of the branches of a mutually exclusive statement, then increment the
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:100
↓ 3 callers
Method
incremented
(self)
crates/ruff_python_formatter/src/comments/map.rs:562
↓ 3 callers
Function
indent
D206, D207, D208
crates/ruff_linter/src/rules/pydocstyle/rules/indent.rs:185
↓ 3 callers
Method
indent_level
(&self)
crates/ruff_python_formatter/src/context.rs:73
↓ 3 callers
Method
indent_style
(&self)
crates/ruff_python_formatter/src/options.rs:236
↓ 3 callers
Function
indentation
(line: &str)
crates/ty_ide/src/docstring/document/preformatted.rs:308
↓ 3 callers
Function
index_values
( entries: impl IntoIterator<Item = (K, V)>, )
crates/ty_python_core/src/frozen.rs:168
↓ 3 callers
Method
indices
( &self, )
crates/ruff_index/src/slice.rs:75
↓ 3 callers
Method
infer_attribute_load
Infer an attribute load, returning its recovery type if lookup fails.
crates/ty_python_semantic/src/types/infer/builder.rs:11128
↓ 3 callers
Method
infer_binary_expression_type
Infer the result type and collect deprecated methods for the enclosing operation. The caller reports them together after expanding union operands and
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:451
↓ 3 callers
Function
infer_binary_type_comparison_inner
( context: &InferContext<'db, '_>, left: Type<'db>, op: NonIdentityOperator, right: Type<'db>,
crates/ty_python_semantic/src/types/infer/comparisons.rs:840
↓ 3 callers
Method
infer_comprehension_specialization
Return specialization(s) of the collection class (list, dict, set) based on the type context and the inferred element / key-value types from the compr
crates/ty_python_semantic/src/types/infer/builder.rs:8597
↓ 3 callers
Method
infer_explicit_type_alias_specialization
Infer the type of an explicitly specialized generic legacy type alias.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1973
↓ 3 callers
Method
infer_from_constraint_set
Records a relation and projects its solutions into the legacy type mapping. Contextual preference checks, variadic inference, and recursive-specializ
crates/ty_python_semantic/src/types/generics.rs:3694
↓ 3 callers
Method
infer_loud
Infer the expression with diagnostics enabled. This method must be called exactly once in the lifetime of the [`MultiInferenceGuard`].
crates/ty_python_semantic/src/types/infer/builder.rs:13012
↓ 3 callers
Method
infer_name_or_attribute_type_expression
( &mut self, ty: Type<'db>, definition: Option<Definition<'db>>, annotation: &
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:291
↓ 3 callers
Method
infer_place_load
Infer the type of the value read from a place expression. This also returns the [`ConstraintKey`]s used by expression-level narrowing.
crates/ty_python_semantic/src/types/infer/builder.rs:10933
↓ 3 callers
Method
infer_scope_body
Infer the body of a module, class, or function scope. As a memory optimization, store `LiteralString` for a leading docstring instead of interning it
crates/ty_python_semantic/src/types/infer/builder.rs:2243
↓ 3 callers
Function
infer_statement_types
Infer all types for a [`Statement`]. This is useful when you want to infer a sub-expression with its natural type context, as statements are the mini
crates/ty_python_semantic/src/types/infer.rs:745
↓ 3 callers
Method
infer_subscript_expression_types
Infer a subscription and report failures while preserving their recovery types.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:1541
↓ 3 callers
Method
infer_tuple_type_expression
Return the type represented by a `tuple[]` expression in a type annotation. This method assumes that a type has already been inferred and stored for
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1618
↓ 3 callers
Method
infer_type_parameters
(&mut self, type_parameters: &ast::TypeParams)
crates/ty_python_semantic/src/types/infer/builder.rs:12068
↓ 3 callers
Method
infer_unary_expression
(&mut self, unary: &ast::ExprUnaryOp)
crates/ty_python_semantic/src/types/infer/builder.rs:11600
↓ 3 callers
Function
infer_unpacked_keyword_types
Infers each unpacked `**kwargs` constructor argument exactly once. Mixed positional-and-keyword `TypedDict` construction needs to inspect unpacked ke
crates/ty_python_semantic/src/types/typed_dict.rs:2166
↓ 3 callers
Method
inferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1300
↓ 3 callers
Function
inherited_member_candidates
( db: &'db dyn Db, class: StaticClassLiteral<'db>, )
crates/ty_python_semantic/src/types/overrides.rs:545
↓ 3 callers
Function
inlay_hints
( db: &dyn Db, file: ProgramFile<'_>, range: TextRange, settings: &InlayHintSettings, )
crates/ty_ide/src/inlay_hints.rs:363
↓ 3 callers
Method
inlay_hints_request
Sends a `textDocument/inlayHint` request for the document at the given path and range.
crates/ty_server/tests/e2e/main.rs:1110
↓ 3 callers
Method
inner_mut
(&mut self)
crates/ty_project/src/files.rs:273
↓ 3 callers
Method
innermost_try
Finds the nearest enclosing `try`, skipping context managers.
crates/ty_python_core/src/builder/except_handlers.rs:330
↓ 3 callers
Method
input
(&self, file: File)
crates/ruff_db/src/diagnostic/render.rs:749
↓ 3 callers
Method
insert
Insert a file path into the module imports.
crates/ruff_graph/src/lib.rs:67
↓ 3 callers
Method
insert_hash_map_type_mapping
( &mut self, bound_typevar: BoundTypeVarInstance<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/generics.rs:3468
↓ 3 callers
Function
insert_narrowing_constraint
( constraints: &mut NarrowingConstraints<'db>, place: ScopedPlaceId, constraint: NarrowingConstrai
crates/ty_python_semantic/src/types/narrow.rs:1408
↓ 3 callers
Method
inspect
Gives access to the memoized content. Performs the formatting if the content hasn't been formatted at this point. # Example Inspect if some memoize
crates/ruff_formatter/src/format_extensions.rs:142
↓ 3 callers
Function
installed_package_event
( server: &mut TestServer, site_packages: &Uri, package: &str, )
crates/ty_server/tests/e2e/goto_definition.rs:558
↓ 3 callers
Method
instance_member
Look up an instance member by name (including superclasses).
crates/ty_python_semantic/src/types/class/named_tuple.rs:310
↓ 3 callers
Method
intern
Returns an inline name directly, or a shared clone of a heap-allocated name.
crates/ruff_python_parser/src/parser/mod.rs:49
↓ 3 callers
Method
intern_atomic_constraint
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, data: AtomicConst
crates/ty_python_semantic/src/types/constraints.rs:1432
↓ 3 callers
Method
intern_constraint
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, data: Constraint<
crates/ty_python_semantic/src/types/constraints.rs:1413
↓ 3 callers
Method
intern_constraint_typevars
Interns all of the typevars mentioned in a constraint in a stable order.
crates/ty_python_semantic/src/types/constraints.rs:1381
↓ 3 callers
Method
intern_source_order
(&mut self, data: SourceOrder)
crates/ty_python_semantic/src/types/constraints.rs:1523
↓ 3 callers
Function
interpolation_fields
(node: &ast::InterpolatedElement)
crates/ruff_python_ast/src/comparable.rs:825
↓ 3 callers
Method
into_all_elements_with_kind
(self)
crates/ty_python_semantic/src/types/tuple.rs:1251
↓ 3 callers
Method
into_branches
(self)
crates/ty_python_core/src/builder.rs:229
↓ 3 callers
Method
into_diagnostic
Convert the violation into a [`Diagnostic`].
crates/ruff_linter/src/violation.rs:74
↓ 3 callers
Method
into_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:564
↓ 3 callers
Method
into_fixed_length
(self)
crates/ty_python_semantic/src/types/tuple.rs:122
↓ 3 callers
Method
into_fragments
(self)
crates/ty_ide/src/docstring/document.rs:115
↓ 3 callers
Method
into_iter
(self)
crates/ruff_python_formatter/src/comments/map.rs:340
↓ 3 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:3238
↓ 3 callers
Method
into_path
The full path that this entry represents. Analogous to [`DirectoryEntry::path`], but moves ownership of the path.
crates/ruff_db/src/system/walk_directory.rs:178
↓ 3 callers
Method
into_place_and_conflicting_declarations
( self, )
crates/ty_python_semantic/src/place.rs:1054
↓ 3 callers
Method
into_protocol_class
Returns `Some` if this is a protocol class, `None` otherwise.
crates/ty_python_semantic/src/types/protocol_class.rs:43
↓ 3 callers
Method
into_type
(self)
crates/ty_python_semantic/src/types/union_type_instance.rs:100
↓ 3 callers
Method
invalid_assignment_to_final_attribute
( &self, object_ty: Type<'db>, target: &ast::ExprAttribute, attribute: &str,
crates/ty_python_semantic/src/types/infer/builder/final_attribute.rs:95
↓ 3 callers
Function
invalid_script_metadata_diagnostic
( file: File, message: impl std::fmt::Display, range: Option<TextRange>, )
crates/ty_project/src/script.rs:394
↓ 3 callers
Method
invalidate_narrowing_aliases_for
Invalidate any narrowing aliases affected by a new definition of `place`.
crates/ty_python_core/src/builder.rs:1173
↓ 3 callers
Function
is_airflow_task
Returns `true` if the given function is decorated with `@airflow.decorators.task` (or `@airflow.sdk.task`), including variant forms like `@task.branch
crates/ruff_linter/src/rules/airflow/helpers.rs:313
↓ 3 callers
Method
is_always_unbound
(&self)
crates/ty_python_core/src/use_def/place_state.rs:325
↓ 3 callers
Function
is_ambiguous_name
Returns `true` if the name should be considered "ambiguous".
crates/ruff_linter/src/rules/pycodestyle/helpers.rs:4
↓ 3 callers
Method
is_available
Return `true` if `member` is an "available" symbol, i.e., a symbol that has not been bound in the current scope currently being visited, or in any con
crates/ruff_python_semantic/src/model.rs:463
↓ 3 callers
Method
is_boolean_test_root
Return `true` if `expression` is an outermost "boolean test". A boolean test is an expression that Python tests for truthiness, such as an `if` condi
crates/ty_python_core/src/lib.rs:643
↓ 3 callers
Method
is_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:249
↓ 3 callers
Function
is_cjk_unified_ideograph
(ch: char)
crates/ruff_unicode_names2/src/lib.rs:74
↓ 3 callers
Method
is_class_literal
(&self)
crates/ty_python_semantic/src/types.rs:3211
↓ 3 callers
Function
is_class_var_annotation
Returns `true` if the given [`Expr`] is a `typing.ClassVar` annotation.
crates/ruff_linter/src/rules/ruff/helpers.rs:60
↓ 3 callers
Method
is_classmethod_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:898
↓ 3 callers
Method
is_code
(&self)
crates/ty_ide/src/docstring/markdown/general.rs:484
↓ 3 callers
Function
is_collection_literal
(expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:13140
↓ 3 callers
Method
is_complete
Whether all keyword values were captured at the call site, rather than described by a type.
crates/ty_python_semantic/src/types/call/arguments.rs:360
↓ 3 callers
Method
is_constraint_set_subtype_of
Return true if this type is a subtype of `target` for every specialization of the type variables in either type.
crates/ty_python_semantic/src/types/relation.rs:585
↓ 3 callers
Function
is_context_variable
Check if an expression is a valid Airflow context variable.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1249
↓ 3 callers
Method
is_continue_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1221
↓ 3 callers
Method
is_cpython
(self)
crates/ty_site_packages/src/lib.rs:549
↓ 3 callers
Method
is_declaration
True if this definition establishes a "declared type" for the place. If so, any assignments reached by this definition are in error if they assign a
crates/ty_python_core/src/definition.rs:908
↓ 3 callers
Method
is_directory
(self)
crates/ruff_db/src/system.rs:338
↓ 3 callers
Function
is_document_excluded_for_linting
Return `true` if the document at the given [`Path`] should be excluded from linting.
crates/ruff_server/src/resolve.rs:10
↓ 3 callers
Function
is_dotted_identifier
Returns whether every component of `name` is a Python identifier. For example, this returns `true` for `"package.Type"` and `false` for `"package.1"`
crates/ty_ide/src/docstring/document/syntax.rs:37
↓ 3 callers
Function
is_dunder_all
Checks if the given expression is a name expression for `__all__`.
crates/ty_ide/src/symbols.rs:1632
↓ 3 callers
Method
is_empty
(&self)
crates/ruff_python_ast/src/nodes.rs:274
↓ 3 callers
Function
is_empty_or_null_string
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:124
↓ 3 callers
Method
is_enabled
(&self)
crates/ty_project/src/uv/environments.rs:493
↓ 3 callers
Method
is_enabled
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:535
↓ 3 callers
Method
is_eof
(&self)
crates/ruff_python_trivia/src/cursor.rs:88
↓ 3 callers
Method
is_escaped
Returns whether a preceding odd-length backslash run escapes this run.
crates/ty_ide/src/docstring/document/syntax.rs:448
↓ 3 callers
Method
is_evidence
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:74
↓ 3 callers
Method
is_exact
(&self)
crates/ty_python_semantic/src/types.rs:2321
↓ 3 callers
Method
is_expanded
(&self)
crates/ruff_formatter/src/format_element.rs:140
↓ 3 callers
Method
is_explicit_export
Return `true` if this [`Binding`] represents an explicit re-export (e.g., `FastAPI` in `from fastapi import FastAPI as FastAPI`).
crates/ruff_python_semantic/src/binding.rs:59
↓ 3 callers
Method
is_expr_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1110
↓ 3 callers
Function
is_fastapi_route
Returns `true` if the function is a FastAPI route.
crates/ruff_linter/src/rules/fastapi/rules/mod.rs:14
← previous
next →
4,101–4,200 of 31,562, ranked by callers