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
Function
check_positional_args_for_non_overloaded_method
Determines whether the positional arguments of an `__exit__` or `__aexit__` method (that is not decorated with `@typing.overload`) are annotated corre
crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs:253
↓ 1 callers
Function
check_positional_args_for_overloaded_method
Determines whether the positional arguments of an `__exit__` or `__aexit__` method overload are annotated correctly.
crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs:303
↓ 1 callers
Function
check_post_init_signature
( context: &InferContext<'db, '_>, configuration: OverrideRulesConfig, class: ClassType<'db>,
crates/ty_python_semantic/src/types/overrides.rs:2252
↓ 1 callers
Method
check_property_access
Record `@property` accesses as implicit invocations of their matching accessor: a read calls the getter, a write calls the setter, and a `del` calls t
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:312
↓ 1 callers
Method
check_property_getter
Checks the getter invoked by `property.__get__`, retaining its error and recovery type.
crates/ty_python_semantic/src/types/call/bind.rs:8707
↓ 1 callers
Method
check_property_setter
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, setter: Type<'db>
crates/ty_python_semantic/src/types/call/bind.rs:8729
↓ 1 callers
Method
check_protocol_instance_pair
Return `true` if this protocol type is disjoint from the protocol `other`. TODO: a protocol `X` is disjoint from a protocol `Y` if `X` and `Y` have a
crates/ty_python_semantic/src/types/instance.rs:1559
↓ 1 callers
Method
check_protocol_member_access_pair
Compares either instance access or class access when relating two protocol members. Both members bind `Self` to the source protocol type; readable ty
crates/ty_python_semantic/src/types/protocol_class.rs:3164
↓ 1 callers
Function
check_python
( query: &DocumentQuery, source_type: ruff_python_ast::PySourceType, )
crates/ruff_server/src/lint.rs:169
↓ 1 callers
Function
check_raise
(checker: &Checker, exc: &Expr, item: &Stmt)
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:97
↓ 1 callers
Method
check_reference_identifier
Checks an identifier that references a variable (a use).
crates/ty_ide/src/references.rs:750
↓ 1 callers
Function
check_removed_attribute_access_on_context_key
Check for removed attribute access on context key value.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:479
↓ 1 callers
Function
check_renamed_rules
(context: &mut CheckSuppressionsContext)
crates/ty_python_semantic/src/suppression.rs:212
↓ 1 callers
Function
check_required_version
(value: &toml::de::DeTable, table_path: &[&str])
crates/ruff_workspace/src/pyproject.rs:118
↓ 1 callers
Function
check_ruff
Run Ruff on the input with lint rules disabled and return its outcome.
python/py-fuzzer/fuzz.py:191
↓ 1 callers
Method
check_rule
Check whether a rule is suppressed at the given range and mark the suppression as used.
crates/ruff_linter/src/suppression.rs:355
↓ 1 callers
Method
check_rule_codes
Check for rule codes and redirected names in valid suppression comments.
crates/ruff_linter/src/suppression.rs:402
↓ 1 callers
Function
check_rule_selectors
( context: &LintContext, document: &DeTable<'_>, source_type: TomlSourceType, )
crates/ruff_linter/src/toml/rule_selectors.rs:13
↓ 1 callers
Function
check_section_order
D420
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:2261
↓ 1 callers
Function
check_selector_array
( context: &LintContext, values: &DeArray<'_>, setting: &'static str, in_lint_table: bool, )
crates/ruff_linter/src/toml/rule_selectors.rs:94
↓ 1 callers
Function
check_selectors
(context: &LintContext, table: &DeTable<'_>, in_lint_table: bool)
crates/ruff_linter/src/toml/rule_selectors.rs:67
↓ 1 callers
Method
check_sequent
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1045
↓ 1 callers
Method
check_setattr_attribute_write
( &self, db: &'db dyn Db, object_ty: Type<'db>, setattr_member: PlaceAndQualif
crates/ty_python_semantic/src/types/attribute_write.rs:1813
↓ 1 callers
Function
check_short_args_list
Determine whether a "short" argument list (i.e., an argument list with less than four elements) contains a star-args argument annotated with `object`.
crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs:215
↓ 1 callers
Method
check_single_implication
( &mut self, db: &'db dyn Db, storage: &ConstraintSetStorage<'db>, ante: Atomi
crates/ty_python_semantic/src/types/constraints/paths.rs:1216
↓ 1 callers
Method
check_single_tautology
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1093
↓ 1 callers
Method
check_slots_string_literal
Checks a string literal that may be an entry in a class's `__slots__`. `__slots__` entries are plain strings, but they name instance attributes of th
crates/ty_ide/src/references.rs:879
↓ 1 callers
Method
check_source_intersection
( &self, db: &'db dyn Db, intersection: IntersectionType<'db>, target: Type<'d
crates/ty_python_semantic/src/types/relation.rs:1795
↓ 1 callers
Method
check_source_union
( &self, db: &'db dyn Db, union: UnionType<'db>, target: Type<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1465
↓ 1 callers
Function
check_static_class_definitions
Iterate over all static class definitions (created using `class` statements) to check that the definition is semantically valid and will not cause an
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:144
↓ 1 callers
Function
check_stdin
Run the linter over a single file, read from `stdin`.
crates/ruff/src/commands/check_stdin.rs:15
↓ 1 callers
Method
check_stmt
(&mut self, stmt: &ast::Stmt, ctx: &Ctx)
crates/ruff_python_parser/src/semantic_errors.rs:79
↓ 1 callers
Function
check_string
(checker: &Checker, literal: &StringLiteral, module: RegexModule, func: &str)
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:181
↓ 1 callers
Function
check_string_or_bytes
Checks for unnecessary escaped quotes in a string or bytes literal. # Panics If the string kind is an f-string.
crates/ruff_linter/src/rules/flake8_quotes/rules/unnecessary_escaped_quote.rs:94
↓ 1 callers
Function
check_string_quotes
Generate `flake8-quote` diagnostics from a token stream.
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:445
↓ 1 callers
Method
check_suite_for_redundant_conditions
Sweep over an entire suite of statements to examine if any direct `if`, `elif`, `assert`, or `while` conditions or `match` guards in that suite are re
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:538
↓ 1 callers
Function
check_super_slots
(checker: &Checker, class_def: &ast::StmtClassDef, slot: &Slot)
crates/ruff_linter/src/rules/pylint/rules/redefined_slots_in_subclass.rs:110
↓ 1 callers
Method
check_suppression_comment
This function determines whether or not `comment` is a useful suppression comment. If it isn't, it will give a reason why the comment is ignored. See
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:129
↓ 1 callers
Function
check_suppressions
( db: &dyn Db, file: PythonFile<'_>, diagnostics: TypeCheckDiagnostics, )
crates/ty_python_semantic/src/suppression.rs:151
↓ 1 callers
Method
check_suppressions
(&self, context: &LintContext, locator: &Locator)
crates/ruff_linter/src/suppression.rs:472
↓ 1 callers
Method
check_target_intersection
( &self, db: &'db dyn Db, source: Type<'db>, intersection: IntersectionType<'d
crates/ty_python_semantic/src/types/relation.rs:1689
↓ 1 callers
Method
check_target_union
( &self, db: &'db dyn Db, source: Type<'db>, union: UnionType<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1500
↓ 1 callers
Function
check_test_function_args
PT019
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:877
↓ 1 callers
Function
check_token
( token: SimpleToken, prev: SimpleToken, prev_prev: SimpleToken, context: Context, locator
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:328
↓ 1 callers
Function
check_tokens
( tokens: &Tokens, path: &Path, locator: &Locator, indexer: &Indexer, stylist: &Stylist,
crates/ruff_linter/src/checkers/tokens.rs:23
↓ 1 callers
Function
check_toml
( query: &DocumentQuery, document: &'a TextDocument, source_type: TomlSourceType, )
crates/ruff_server/src/lint.rs:262
↓ 1 callers
Function
check_trigger_rule_argument_value
Check if `trigger_rule` argument contains a deprecated value. Check both string literal and `TriggerRule` enum usages: ```python from airflow.operat
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1391
↓ 1 callers
Method
check_triple_impossibility
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1149
↓ 1 callers
Method
check_tuple_boundaries
Compare the fixed ends, pairing any overhanging elements with the provided variable types. Use raw endpoints: a symbolic pack cannot be prenormalized
crates/ty_python_semantic/src/types/tuple.rs:769
↓ 1 callers
Function
check_ty
Type-check the input with ty and return its outcome. A completed check can report diagnostics and still count as successful.
python/py-fuzzer/fuzz.py:171
↓ 1 callers
Function
check_type_check_call
Returns `true` if an [`Expr`] is a call to check types.
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:79
↓ 1 callers
Function
check_type_check_test
Returns `true` if an [`Expr`] is a test to check types (e.g. via isinstance)
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:86
↓ 1 callers
Function
check_type_guard_definition
Check that all type guard function definitions have at least one positional parameter (in addition to `self`/`cls` for methods), and for `TypeIs`, tha
crates/ty_python_semantic/src/types/infer/builder/post_inference/typeguard.rs:13
↓ 1 callers
Method
check_type_observations
( &self, bindings: &Bindings<'db>, revealed_type: Option<Type<'db>>, call_expr
crates/ty_python_semantic/src/types/infer/builder/function.rs:1493
↓ 1 callers
Method
check_type_pair_impl
( &self, db: &'db dyn Db, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types/relation.rs:3763
↓ 1 callers
Method
check_type_variable_scope
Check whether a type variable can be used in the current type expression. Unbound variables fall back to `Unknown`. Bound variables retain their type
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:3613
↓ 1 callers
Method
check_typevar_subclass_relation_to_target
Check the relation between a `type[T]` and a target type `A` when `A` can either be projected into the ordinary instance/object domain via `.to_instan
crates/ty_python_semantic/src/types/relation.rs:2025
↓ 1 callers
Method
check_typevar_with_exclusions
Check `(U & ~A) ≤ B` for static `A` and `B`. When collecting constraints, use the equivalent bound `U ≤ B | A` to retain specializations such as `U =
crates/ty_python_semantic/src/types/relation.rs:1749
↓ 1 callers
Method
check_union_operator
( &self, binary: &ast::ExprBinOp, left_type_value: Type<'db>, right_type_value
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1339
↓ 1 callers
Function
check_unknown_rule
Checks for `ty: ignore` and `type: ignore[ty:<code>]` comments that reference unknown rules.
crates/ty_python_semantic/src/suppression.rs:197
↓ 1 callers
Method
check_unused_awaitable
(&self, expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/awaitable.rs:41
↓ 1 callers
Function
check_unused_suppressions
Checks for unused suppression comments in `file` and adds diagnostic for each of them to `diagnostics`. Does nothing if the [`UNUSED_IGNORE_COMMENT`]
crates/ty_python_semantic/src/suppression/unused.rs:20
↓ 1 callers
Function
check_useless_usefixtures
(checker: &Checker, decorator: &Decorator, marker: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/marks.rs:206
↓ 1 callers
Function
check_values
PT007
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:522
↓ 1 callers
Method
check_variable_length_vs_tuple_spec
( &self, db: &'db dyn Db, source: &VariableLengthTuple<Type<'db>, VariableSegment<'db>
crates/ty_python_semantic/src/types/tuple.rs:460
↓ 1 callers
Method
checked_add
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:281
↓ 1 callers
Method
checked_sub
(self, rhs: Self)
crates/ruff_source_file/src/line_index.rs:636
↓ 1 callers
Method
checked_sub
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:297
↓ 1 callers
Method
checkpoint
Creates a checkpoint to which the lexer can later return to using [`Self::rewind`].
crates/ruff_python_parser/src/lexer.rs:1395
↓ 1 callers
Method
child_directory
Returns an existing child directory and retrieves its listing without changing this directory. `name` should be a single path component.
crates/ty_module_resolver/src/path.rs:297
↓ 1 callers
Function
class_annotation_runtime_semantics
Returns the desired `RuntimeSemantics` for a class's annotations
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:142
↓ 1 callers
Function
class_as_data_structure
B903
crates/ruff_linter/src/rules/flake8_bugbear/rules/class_as_data_structure.rs:49
↓ 1 callers
Function
class_attribute_exists_at_runtime
Returns whether a class attribute has any reachable runtime binding.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1184
↓ 1 callers
Function
class_attribute_write_requirement
Resolve a class-object write against the metaclass and then the class object's attributes. The receiver must be convertible to an instance type so th
crates/ty_python_semantic/src/types/attribute_write.rs:723
↓ 1 callers
Method
class_body_declaration
Finds the type governing a new class-body default. A bare `ClassVar` gets its public type from the base class's bindings. An unannotated binding reta
crates/ty_python_semantic/src/types/class.rs:2885
↓ 1 callers
Function
class_def_visit_preorder_except_body
Very nearly `crate::node::StmtClassDef.visit_preorder`, except it is specialized and, crucially, doesn't traverse the body.
crates/ruff_linter/src/rules/ruff/rules/unused_async.rs:139
↓ 1 callers
Method
class_definition_of_method
Returns the class definition for the enclosing class if this scope is a method body.
crates/ty_python_core/src/scope.rs:63
↓ 1 callers
Function
class_fallback_write_requirement
Convert a class-attribute fallback into a write type, binding `Self` to the class instance.
crates/ty_python_semantic/src/types/attribute_write.rs:1041
↓ 1 callers
Function
class_implementations_for_file
Finds subclasses of `roots` defined in `file`.
crates/ty_python_semantic/src/types/ide_support.rs:467
↓ 1 callers
Function
class_keyword_config
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:980
↓ 1 callers
Function
class_mro_literals
( db: &'db dyn Db, class_literal: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types.rs:11624
↓ 1 callers
Function
class_object_assignment_members
Resolve class-object members when a class attribute can shadow its metaclass member. A definitely non-data metaclass member is shadowed entirely. If
crates/ty_python_semantic/src/types/attribute_write.rs:1148
↓ 1 callers
Method
class_object_instance
Class literals also occur here because `type[FinalClass]` normalizes to a class literal.
crates/ty_python_semantic/src/types/call/ambiguous.rs:165
↓ 1 callers
Method
class_pattern_arguments_for_arm
( &self, kind: &ClassPatternPredicateKind<'db>, context: &ClassPatternContext<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2560
↓ 1 callers
Function
class_pattern_is_exhaustive
Return whether every value in `subject_ty` is statically guaranteed to match this class pattern. Attribute subpatterns are checked recursively agains
crates/ty_python_semantic/src/types/match_pattern.rs:323
↓ 1 callers
Function
class_pattern_positional_result
Validate positional subpatterns against a statically known `__match_args__` type.
crates/ty_python_semantic/src/types/match_pattern.rs:475
↓ 1 callers
Method
class_scope
(self)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:877
↓ 1 callers
Function
class_visibility
Infer the [`Visibility`] of a class from its name.
crates/ruff_python_semantic/src/analyze/visibility.rs:224
↓ 1 callers
Function
class_with_mixed_type_vars
RUF053
crates/ruff_linter/src/rules/ruff/rules/class_with_mixed_type_vars.rs:83
↓ 1 callers
Method
classify
(name: &str)
crates/ty_python_semantic/src/semantic_model.rs:949
↓ 1 callers
Function
classify_decorator
(checker: &Checker, decorator: &Decorator)
crates/ruff_linter/src/rules/ruff/rules/incorrect_decorator_order.rs:115
↓ 1 callers
Method
classify_from_alias_type
( &self, ty: Type, local_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:744
↓ 1 callers
Method
classify_from_definition
( &self, definition: Definition, name_str: &str, )
crates/ty_ide/src/semantic_tokens.rs:404
↓ 1 callers
Method
classify_from_type_for_attribute
( &self, ty: Type, attr_name: &ast::Identifier, )
crates/ty_ide/src/semantic_tokens.rs:586
↓ 1 callers
Method
classify_function_definition
(&self, func: &ast::StmtFunctionDef)
crates/ty_ide/src/semantic_tokens.rs:710
↓ 1 callers
Method
classify_match_token
Classify the `match` soft keyword token. # Panics If the parser isn't positioned at a `match` token.
crates/ruff_python_parser/src/parser/statement.rs:3914
↓ 1 callers
Method
classify_name
( &self, name: &ast::ExprName, )
crates/ty_ide/src/semantic_tokens.rs:380
↓ 1 callers
Method
classify_parameter
( &self, _param: &ast::Parameter, is_first: bool, func: &ast::StmtFunctionDef,
crates/ty_ide/src/semantic_tokens.rs:685
↓ 1 callers
Method
classify_redundant_condition
Classify a condition using its inferred type and truthiness. We return `Some` if the condition is always truthy, always falsy, or otherwise suspiciou
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:689
↓ 1 callers
Method
classify_sequence_enum_member
Classifies one element from a sequence-form `names` argument. This distinguishes between known names, opaque names, known explicit pairs, opaque expl
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:874
← previous
next →
8,401–8,500 of 31,766, ranked by callers