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
evaluate_instance_fallback
( &mut self, object_ty: Type<'db>, requirement: &FallbackAttributeWriteRequirement<'db
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:940
↓ 1 callers
Function
evaluate_intersection_left
Combine compatible comparison results from the positive elements of an intersection target.
crates/ty_python_semantic/src/types/equality.rs:1437
↓ 1 callers
Method
evaluate_negative_match_pattern
( &self, subject: Expression<'db>, pattern: &PatternPredicateKind<'db>, )
crates/ty_python_semantic/src/types/narrow.rs:4869
↓ 1 callers
Method
evaluate_negative_match_pattern_sequence
( &mut self, subject: Expression<'db>, kind: &SequencePatternPredicateKind<'db>,
crates/ty_python_semantic/src/types/narrow.rs:4894
↓ 1 callers
Method
evaluate_negative_match_pattern_singleton
( &mut self, subject: Expression<'db>, singleton: ast::Singleton, )
crates/ty_python_semantic/src/types/narrow.rs:4853
↓ 1 callers
Method
evaluate_negative_pattern_predicate_kind
( &mut self, pattern_predicate_kind: &PatternPredicateKind<'db>, subject: Expression<'
crates/ty_python_semantic/src/types/narrow.rs:1992
↓ 1 callers
Method
evaluate_pair
Reuse the saved enum result and compare all other values normally.
crates/ty_python_semantic/src/types/equality/enums.rs:141
↓ 1 callers
Method
evaluate_paramspec_sub_call
Invoke a sub-call for the given `ParamSpec` type variable, using the forwarded arguments. The forwarded arguments are those matched to the `ParamSpec
crates/ty_python_semantic/src/types/call/bind.rs:8106
↓ 1 callers
Method
evaluate_pattern_predicate
( &mut self, pattern: PatternPredicate<'db>, is_positive: bool, )
crates/ty_python_semantic/src/types/narrow.rs:2040
↓ 1 callers
Method
evaluate_positive_pattern_related_expressions
( &mut self, pattern: &PatternPredicateKind<'db>, subject: Expression<'db>, su
crates/ty_python_semantic/src/types/narrow.rs:2072
↓ 1 callers
Function
evaluate_projected_narrowing_checkpoint
( db: &'db dyn Db, scope: ScopeId<'db>, place: ScopedPlaceId, constraint: ScopedNarrowingConst
crates/ty_python_semantic/src/reachability.rs:1152
↓ 1 callers
Method
evaluate_property_calls
Retains the accessors and nominal class when the property initializer is inherited.
crates/ty_python_semantic/src/types/call/bind/property.rs:12
↓ 1 callers
Function
evaluate_reachability_checkpoint
( db: &'db dyn Db, scope: ScopeId<'db>, id: ScopedReachabilityConstraintId, )
crates/ty_python_semantic/src/reachability.rs:946
↓ 1 callers
Function
evaluate_structural_comparison
Compare values not handled by the enum, dynamic, or finite-value stages.
crates/ty_python_semantic/src/types/equality.rs:709
↓ 1 callers
Method
evaluate_subject_element_pattern
( &mut self, subject_element: SubjectElementPatternPredicate<'db>, )
crates/ty_python_semantic/src/types/narrow.rs:3506
↓ 1 callers
Method
evaluate_test_expr
Evaluate the given expression and return its truthiness. Returns [`None`] if the expression type doesn't implement `__bool__` correctly.
crates/ty_python_semantic/src/dunder_all.rs:194
↓ 1 callers
Method
evaluate_type_guard_call
Helper to evaluate TypeGuard/TypeIs narrowing for a call expression. This is based on the call expression's return type, so it applies to any callable
crates/ty_python_semantic/src/types/narrow.rs:4767
↓ 1 callers
Function
evaluate_type_inequality
Return a constraint for `left` in a branch where `left != right` has the given truthiness. Returns `None` when the comparison behavior of either oper
crates/ty_python_semantic/src/types/equality.rs:188
↓ 1 callers
Method
evidence_types
(&self)
crates/ty_python_semantic/src/types/constraints.rs:4936
↓ 1 callers
Function
exact_tuple_sequence_pattern_fallthrough_type
Return the part of an exact fixed-length tuple that can remain after a sequence pattern fails. A pattern fails if any aligned element pattern fails.
crates/ty_python_semantic/src/types/match_pattern.rs:1213
↓ 1 callers
Method
exact_typevar_upper_bound
Return the exact class-object type of this `type[T]` `TypeVar`'s upper bound, if it has one. This can only succeed when the upper bound normalizes to
crates/ty_python_semantic/src/types/subclass_of.rs:194
↓ 1 callers
Method
exactly_one_paramspec
Returns `true` if this generic context contains exactly one `ParamSpec` and no other type variables. For example: ```py class Foo[**P]: ... # true c
crates/ty_python_semantic/src/types/generics.rs:587
↓ 1 callers
Function
exc_info_arg_is_falsey
(call: &ExprCall, checker: &Checker)
crates/ruff_linter/src/rules/flake8_logging/rules/exception_without_exc_info.rs:84
↓ 1 callers
Function
exc_info_outside_except_handler
LOG014
crates/ruff_linter/src/rules/flake8_logging/rules/exc_info_outside_except_handler.rs:90
↓ 1 callers
Function
except_handler
Run lint rules over an [`ExceptHandler`] syntax node.
crates/ruff_linter/src/checkers/ast/analyze/except_handler.rs:11
↓ 1 callers
Function
except_with_empty_tuple
B029
crates/ruff_linter/src/rules/flake8_bugbear/rules/except_with_empty_tuple.rs:59
↓ 1 callers
Function
except_with_non_exception_classes
B030
crates/ruff_linter/src/rules/flake8_bugbear/rules/except_with_non_exception_classes.rs:58
↓ 1 callers
Method
exception_checkpoint_key
Identifies the visible bindings and control-flow path observed by an exception handler.
crates/ty_python_core/src/use_def.rs:2360
↓ 1 callers
Method
exception_handler_symbol_ty_from_valid_ty
( &self, ty: Type<'db>, type_base_exception: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:2639
↓ 1 callers
Function
exception_needs_match
PT011
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:266
↓ 1 callers
Method
exception_ty
Returns the expected type when the cursor sits inside a `raise` or `except` expression. The return value is always `None` if the cursor is not inside
crates/ty_ide/src/completion.rs:1407
↓ 1 callers
Function
exception_without_exc_info
LOG007
crates/ruff_linter/src/rules/flake8_logging/rules/exception_without_exc_info.rs:50
↓ 1 callers
Method
exceptions
The set of exceptions that were handled when resolution was attempted.
crates/ruff_python_semantic/src/reference.rs:178
↓ 1 callers
Method
exclude
Whether the completion that would be built from the given builder should be excluded based on this context. This only returns `true` when it is defin
crates/ty_ide/src/completion.rs:1742
↓ 1 callers
Function
exclude_from_variance
Whether a source method is exempt from declared-variance validation.
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:154
↓ 1 callers
Method
exclude_name
(self)
crates/ty_project/src/metadata/options.rs:1573
↓ 1 callers
Function
exclude_with_model_form
DJ006
crates/ruff_linter/src/rules/flake8_django/rules/exclude_with_model_form.rs:51
↓ 1 callers
Function
excluded_from_proto_members
Returns `true` if a declaration or binding to a given name in a protocol class body should be excluded from the list of protocol members of that class
crates/ty_python_semantic/src/types/protocol_class.rs:3468
↓ 1 callers
Function
exclusion_is_covered
(db: &'db dyn Db, types: TypePair<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:207
↓ 1 callers
Function
exec_used
S102
crates/ruff_linter/src/rules/flake8_bandit/rules/exec_used.rs:37
↓ 1 callers
Method
execute
(&self, _command: Command)
crates/ty_server/src/system.rs:333
↓ 1 callers
Method
execute
(&self, command: Command)
crates/ruff_db/src/system/test.rs:217
↓ 1 callers
Method
execute
(&self, command: Command)
crates/ruff_db/src/system/os.rs:232
↓ 1 callers
Function
execute_command
Sends an executeCommand request to the TestServer
crates/ty_server/tests/e2e/commands.rs:8
↓ 1 callers
Method
exempts
Return `true` if a given diagnostic candidate should be exempted. Reasons for exemption could be that the condition serves a defensive-programming pu
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:183
↓ 1 callers
Function
existing_crate_versions
Return the names of workspace crates whose current version exists on crates.io.
scripts/publish-crates.py:109
↓ 1 callers
Function
existing_directory
( path: PathBuf, description: &'static str, system: &dyn System, )
crates/ty_project/src/uv/metadata.rs:216
↓ 1 callers
Function
existing_tests
Returns the existing tests in the given directory.
crates/ruff_python_parser/tests/generate_inline_tests.rs:291
↓ 1 callers
Method
exists
(&self, path: &SystemPath)
crates/ruff_db/src/system/memory_fs.rs:153
↓ 1 callers
Method
exists_inner
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Constrai
crates/ty_python_semantic/src/types/constraints.rs:4605
↓ 1 callers
Method
exit_scope
Pop an [`ExceptionContextStack`] off the stack of stacks. Each [`ExceptionContextStack`] is only valid for a single scope.
crates/ty_python_core/src/builder/except_handlers.rs:57
↓ 1 callers
Function
exit_status_from_diagnostics
( diagnostics: &[Diagnostic], terminal_settings: &TerminalSettings, )
crates/ty/src/lib.rs:764
↓ 1 callers
Function
expand
( prefix_ident: &Ident, variants: impl Iterator<Item = (&'a str, &'a Vec<Attribute>)>, )
crates/ruff_macros/src/rule_code_prefix.rs:7
↓ 1 callers
Method
expand
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call/arguments.rs:163
↓ 1 callers
Method
expand_checkpoint
Expands a deferred suffix when canonicalizing a join requires its predicates. Keeping checkpoints opaque during evaluation avoids repeated work. Duri
crates/ty_python_semantic/src/reachability.rs:1458
↓ 1 callers
Method
expand_eagerly_
(self, db: &'db dyn Db, program: Program<'db>)
crates/ty_python_semantic/src/types.rs:10825
↓ 1 callers
Function
expand_elements
Expands a sequence of element types, bounding the size of their Cartesian product.
crates/ty_python_semantic/src/types/type_expansion.rs:33
↓ 1 callers
Method
expand_paramspec_variadics
Expands adjacent `P.args`/`P.kwargs` placeholders into their mapped parameters.
crates/ty_python_semantic/src/types/signatures.rs:5830
↓ 1 callers
Function
expand_site_packages_placeholder
( path: &SystemPath, python_version: PythonVersion, )
crates/ty_test/src/lib.rs:590
↓ 1 callers
Function
expand_to_qualified_name_attribute
Returns `Some` [`QualifiedName`] delineating the path for the maximal [`ExprName`] or [`ExprAttribute`] containing the expression associated to the gi
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:822
↓ 1 callers
Function
expanded_diagnostic_location
( span: &diagnostic::Span, position_encoding: SourcePositionEncoding, )
crates/ruff_wasm/src/lib.rs:155
↓ 1 callers
Function
expanded_fixed_length_starred_class_base_tuple
If `base_node` is a starred class base whose value is inferred as a fixed-length tuple, returns the unpacked tuple in source order.
crates/ty_python_semantic/src/types/class/static_literal.rs:3602
↓ 1 callers
Method
expect_modules
(mut self, names: &[&'a str])
crates/ty_module_resolver/src/resolve/search.rs:1555
↓ 1 callers
Method
expect_primary_span
Returns the "primary" span of this diagnostic, panicking if it does not exist. See [`Diagnostic::primary_span`] for more details.
crates/ruff_db/src/diagnostic/mod.rs:349
↓ 1 callers
Method
expect_python
(self)
crates/ruff_linter/src/source_kind.rs:58
↓ 1 callers
Method
expect_single_definition
( &self, definition_key: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy, )
crates/ty_python_core/src/builder.rs:409
↓ 1 callers
Method
expected_arg
(self)
crates/ruff_linter/src/rules/ruff/rules/legacy_form_pytest_raises.rs:107
↓ 1 callers
Method
expected_kind
Returns the docstring kind if the state is expecting a docstring.
crates/ruff_linter/src/checkers/ast/mod.rs:128
↓ 1 callers
Function
expected_return_type
The type that a return expression must produce for a given annotation.
crates/ty_python_semantic/src/types/infer/builder/function.rs:152
↓ 1 callers
Method
expected_string_literal_completions
Returns completion candidates from a string's expected type and dictionary initializer. If provided, `subscript` must have `string_expr` as its compl
crates/ty_python_semantic/src/semantic_model.rs:697
↓ 1 callers
Method
experimental_use_uv
(&self)
crates/ty_server/src/session/options.rs:113
↓ 1 callers
Function
explicit
ISC003
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/explicit.rs:66
↓ 1 callers
Method
explicit_bases
Returns the explicit base classes of this dynamic class. For assigned calls, bases are computed lazily using deferred inference to handle forward ref
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:197
↓ 1 callers
Function
explicit_external_stub_fixture_cursor_test
(test_source: &str)
crates/ty_ide/src/find_references.rs:3387
↓ 1 callers
Function
explicit_f_string_type_conversion
RUF010
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:66
↓ 1 callers
Function
explicit_fixture_name_at_offset
Returns a target for the explicit fixture name at `offset`. Quotes, prefixes, and token boundaries select the name's contents. This makes it so that
crates/ty_ide/src/find_references.rs:55
↓ 1 callers
Method
explicit_keyword_names
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:379
↓ 1 callers
Method
explicit_metaclass
Return the explicit `metaclass` of this class, if one is defined. ## Note Only call this function from queries in the same file or your query depends
crates/ty_python_semantic/src/types/class/static_literal.rs:1276
↓ 1 callers
Method
explicit_return_type
Compute the explicit return type from a `__new__` or metaclass `__call__`. This method is only used for `__new__` and metaclass `__call__`, which (un
crates/ty_python_semantic/src/types/call/bind/constructor.rs:549
↓ 1 callers
Method
explicit_title
Returns the explicit display title, if present. For `` :class:`Model <pkg.Model>` ``, this returns `Some("Model")`.
crates/ty_ide/src/docstring/document/syntax.rs:210
↓ 1 callers
Function
explicit_with_items
Check if `with_items` contains a single item which should not necessarily be grouped with other items. For example: ```python async with asyncio.time
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_with.rs:87
↓ 1 callers
Method
exports_for
Returns the exports from the module at the given path. The path given must have been written to this test's salsa DB.
crates/ty_ide/src/symbols.rs:3318
↓ 1 callers
Method
exposures
Returns the equally viable exposures through which the request reaches the fixture.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:256
↓ 1 callers
Function
expr_and_false
SIM223
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:849
↓ 1 callers
Function
expr_and_not_expr
SIM220
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:595
↓ 1 callers
Method
expr_bool_op
Boolean operations combine places from all sub-expressions.
crates/ty_python_core/src/place.rs:770
↓ 1 callers
Method
expr_call
Call expressions can narrow their first argument (isinstance, issubclass, hasattr, len) or narrow based on TypeGuard/TypeIs return types.
crates/ty_python_core/src/place.rs:728
↓ 1 callers
Method
expr_compare
Compare expressions can narrow places on either side of the comparison, and can also narrow subscript bases (for `TypedDict` and tuple narrowing).
crates/ty_python_core/src/place.rs:693
↓ 1 callers
Method
expr_if
(&self, expr_if: &ast::ExprIf)
crates/ty_python_core/src/place.rs:778
↓ 1 callers
Method
expr_in_ast
Get a "safe" [`Expr`] to use for referring to the given (sub-)expression. If we're analyzing a string annotation, it will return the string literal's
crates/ty_python_semantic/src/semantic_model.rs:567
↓ 1 callers
Function
expr_might_be_old_style_typevar_like
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_python_semantic/src/analyze/class.rs:482
↓ 1 callers
Function
expr_might_be_typevar_like
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_python_semantic/src/analyze/class.rs:474
↓ 1 callers
Method
expr_mut
Returns a mutable reference to the expression contained in this parsed output.
crates/ruff_python_parser/src/lib.rs:553
↓ 1 callers
Function
expr_or_not_expr
SIM221
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:653
↓ 1 callers
Function
expr_or_true
SIM222
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:831
↓ 1 callers
Function
expression
Run lint rules over an [`Expr`] syntax node.
crates/ruff_linter/src/checkers/ast/analyze/expression.rs:25
↓ 1 callers
Method
expression
(&self)
crates/ty_python_core/src/member.rs:34
↓ 1 callers
Method
expression
Returns the underlying [`Expression`] that is being unpacked.
crates/ty_python_core/src/unpack.rs:104
↓ 1 callers
Method
expression_definitions
Gets definitions for the underlying expression, excluding call dispatch targets.
crates/ty_ide/src/goto.rs:626
↓ 1 callers
Method
expression_place_use
Returns the [`PlaceUse`](ast_ids::PlaceUse) for an expression that reads an indexed place.
crates/ty_python_core/src/lib.rs:378
← previous
next →
9,201–9,300 of 31,766, ranked by callers