MCPcopy Create free account

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

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

↓ 1 callersFunctioncheck_name
Check whether a removed Airflow name is used. For example: ```python from airflow import Dataset from airflow import datasets # Accessing via attri
crates/ruff_linter/src/rules/airflow/rules/suggested_to_update_3_0.rs:190
↓ 1 callersFunctioncheck_names
PT006
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:348
↓ 1 callersFunctioncheck_names_moved_to_provider
(checker: &Checker, expr: &Expr, ranged: TextRange)
crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs:128
↓ 1 callersFunctioncheck_names_moved_to_provider
(checker: &Checker, expr: &Expr, ranged: TextRange)
crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs:112
↓ 1 callersMethodcheck_negation_redundancy
Check whether a `not` expression used as a value contains a redundant boolean test. Report a diagnostic if so. For example, `result = not func` will
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:480
↓ 1 callersMethodcheck_nested_conditions
Find and check boolean tests within subexpressions of `test`. This includes tests inside call arguments and collection elements. A `not` expression o
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:1166
↓ 1 callersFunctioncheck_non_generic_overload_implementation_consistency
Check non-generic overload signatures against their implementation. This is the first, deliberately narrow pass at overload implementation consistenc
crates/ty_python_semantic/src/types/infer/builder/post_inference/overloaded_function.rs:304
↓ 1 callersFunctioncheck_noqa
( context: &mut LintContext, path: &Path, locator: &Locator, comment_ranges: &CommentRanges,
crates/ruff_linter/src/checkers/noqa.rs:28
↓ 1 callersFunctioncheck_os_environ_subscript
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs:198
↓ 1 callersFunctioncheck_overloaded_function
Check the overloaded functions in this scope. This only checks the overloaded functions that are: 1. Visible publicly at the end of this scope 2. Or,
crates/ty_python_semantic/src/types/infer/builder/post_inference/overloaded_function.rs:35
↓ 1 callersMethodcheck_pair_implication
( &mut self, db: &'db dyn Db, storage: &ConstraintSetStorage<'db>, ante1: Atom
crates/ty_python_semantic/src/types/constraints/paths.rs:1158
↓ 1 callersMethodcheck_pair_impossibility
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1094
↓ 1 callersFunctioncheck_password_kwarg
(checker: &Checker, parameter: &Parameter, default: &Expr)
crates/ruff_linter/src/rules/flake8_bandit/rules/hardcoded_password_default.rs:59
↓ 1 callersFunctioncheck_patch_call
(checker: &Checker, call: &ast::ExprCall, index: usize)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/patch.rs:80
↓ 1 callersFunctioncheck_pattern_name
(checker: &Checker, name: &Identifier)
crates/ruff_linter/src/checkers/ast/analyze/pattern.rs:27
↓ 1 callersFunctioncheck_pep695_function_legacy_typevars
Check that a function using PEP 695 syntax does not also introduce legacy type variables.
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:271
↓ 1 callersFunctioncheck_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 callersFunctioncheck_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 callersFunctioncheck_post_init_signature
( context: &InferContext<'db, '_>, configuration: OverrideRulesConfig, class: ClassType<'db>,
crates/ty_python_semantic/src/types/overrides.rs:2253
↓ 1 callersMethodcheck_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 callersMethodcheck_property_getter
Checks the getter invoked by `property.__get__`, retaining its error and recovery type.
crates/ty_python_semantic/src/types/call/bind.rs:8590
↓ 1 callersMethodcheck_property_setter
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, setter: Type<'db>
crates/ty_python_semantic/src/types/call/bind.rs:8612
↓ 1 callersMethodcheck_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:1514
↓ 1 callersMethodcheck_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:3073
↓ 1 callersFunctioncheck_python
( query: &DocumentQuery, source_type: ruff_python_ast::PySourceType, )
crates/ruff_server/src/lint.rs:169
↓ 1 callersFunctioncheck_raise
(checker: &Checker, exc: &Expr, item: &Stmt)
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:97
↓ 1 callersMethodcheck_reference_identifier
Checks an identifier that references a variable (a use).
crates/ty_ide/src/references.rs:743
↓ 1 callersFunctioncheck_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 callersFunctioncheck_renamed_rules
(context: &mut CheckSuppressionsContext)
crates/ty_python_semantic/src/suppression.rs:212
↓ 1 callersFunctioncheck_required_version
(value: &toml::de::DeTable, table_path: &[&str])
crates/ruff_workspace/src/pyproject.rs:118
↓ 1 callersFunctioncheck_ruff
Run Ruff on the input with lint rules disabled and return its outcome.
python/py-fuzzer/fuzz.py:191
↓ 1 callersMethodcheck_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 callersMethodcheck_rule_codes
Check for rule codes and redirected names in valid suppression comments.
crates/ruff_linter/src/suppression.rs:402
↓ 1 callersFunctioncheck_rule_selectors
( context: &LintContext, document: &DeTable<'_>, source_type: TomlSourceType, )
crates/ruff_linter/src/toml/rule_selectors.rs:13
↓ 1 callersFunctioncheck_section_order
D420
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:2261
↓ 1 callersFunctioncheck_selector_array
( context: &LintContext, values: &DeArray<'_>, setting: &'static str, in_lint_table: bool, )
crates/ruff_linter/src/toml/rule_selectors.rs:94
↓ 1 callersFunctioncheck_selectors
(context: &LintContext, table: &DeTable<'_>, in_lint_table: bool)
crates/ruff_linter/src/toml/rule_selectors.rs:67
↓ 1 callersMethodcheck_sequent
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1019
↓ 1 callersMethodcheck_setattr_attribute_write
( &self, db: &'db dyn Db, object_ty: Type<'db>, setattr_member: PlaceAndQualif
crates/ty_python_semantic/src/types/attribute_write.rs:1673
↓ 1 callersFunctioncheck_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 callersMethodcheck_single_implication
( &mut self, db: &'db dyn Db, storage: &ConstraintSetStorage<'db>, ante: Atomi
crates/ty_python_semantic/src/types/constraints/paths.rs:1190
↓ 1 callersMethodcheck_single_tautology
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1067
↓ 1 callersMethodcheck_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:872
↓ 1 callersMethodcheck_source_intersection
( &self, db: &'db dyn Db, intersection: IntersectionType<'db>, target: Type<'d
crates/ty_python_semantic/src/types/relation.rs:1746
↓ 1 callersMethodcheck_source_union
( &self, db: &'db dyn Db, union: UnionType<'db>, target: Type<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1464
↓ 1 callersFunctioncheck_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:142
↓ 1 callersFunctioncheck_stdin
Run the linter over a single file, read from `stdin`.
crates/ruff/src/commands/check_stdin.rs:15
↓ 1 callersMethodcheck_stmt
(&mut self, stmt: &ast::Stmt, ctx: &Ctx)
crates/ruff_python_parser/src/semantic_errors.rs:79
↓ 1 callersFunctioncheck_string
(checker: &Checker, literal: &StringLiteral, module: RegexModule, func: &str)
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:181
↓ 1 callersFunctioncheck_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 callersFunctioncheck_string_quotes
Generate `flake8-quote` diagnostics from a token stream.
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:445
↓ 1 callersMethodcheck_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 callersFunctioncheck_super_slots
(checker: &Checker, class_def: &ast::StmtClassDef, slot: &Slot)
crates/ruff_linter/src/rules/pylint/rules/redefined_slots_in_subclass.rs:110
↓ 1 callersMethodcheck_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 callersFunctioncheck_suppressions
( db: &dyn Db, file: PythonFile<'_>, diagnostics: TypeCheckDiagnostics, )
crates/ty_python_semantic/src/suppression.rs:151
↓ 1 callersMethodcheck_suppressions
(&self, context: &LintContext, locator: &Locator)
crates/ruff_linter/src/suppression.rs:472
↓ 1 callersMethodcheck_target_intersection
( &self, db: &'db dyn Db, source: Type<'db>, intersection: IntersectionType<'d
crates/ty_python_semantic/src/types/relation.rs:1688
↓ 1 callersMethodcheck_target_union
( &self, db: &'db dyn Db, source: Type<'db>, union: UnionType<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1499
↓ 1 callersFunctioncheck_test_function_args
PT019
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:877
↓ 1 callersFunctioncheck_token
( token: SimpleToken, prev: SimpleToken, prev_prev: SimpleToken, context: Context, locator
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:328
↓ 1 callersFunctioncheck_tokens
( tokens: &Tokens, path: &Path, locator: &Locator, indexer: &Indexer, stylist: &Stylist,
crates/ruff_linter/src/checkers/tokens.rs:23
↓ 1 callersFunctioncheck_toml
( query: &DocumentQuery, document: &'a TextDocument, source_type: TomlSourceType, )
crates/ruff_server/src/lint.rs:262
↓ 1 callersFunctioncheck_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:1402
↓ 1 callersMethodcheck_triple_impossibility
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:1123
↓ 1 callersMethodcheck_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 callersFunctioncheck_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 callersFunctioncheck_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 callersFunctioncheck_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 callersFunctioncheck_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:8
↓ 1 callersMethodcheck_type_observations
( &self, bindings: &Bindings<'db>, revealed_type: Option<Type<'db>>, call_expr
crates/ty_python_semantic/src/types/infer/builder/function.rs:1495
↓ 1 callersMethodcheck_type_pair_impl
( &self, db: &'db dyn Db, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types/relation.rs:3706
↓ 1 callersMethodcheck_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 callersMethodcheck_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:1976
↓ 1 callersMethodcheck_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 callersFunctioncheck_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 callersMethodcheck_unused_awaitable
(&self, expression: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/awaitable.rs:41
↓ 1 callersFunctioncheck_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 callersFunctioncheck_useless_usefixtures
(checker: &Checker, decorator: &Decorator, marker: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/marks.rs:206
↓ 1 callersFunctioncheck_values
PT007
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:522
↓ 1 callersMethodcheck_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 callersMethodchecked_add
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:281
↓ 1 callersMethodchecked_sub
(self, rhs: Self)
crates/ruff_source_file/src/line_index.rs:636
↓ 1 callersMethodchecked_sub
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:297
↓ 1 callersMethodcheckpoint
Creates a checkpoint to which the lexer can later return to using [`Self::rewind`].
crates/ruff_python_parser/src/lexer.rs:1395
↓ 1 callersMethodchild_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 callersFunctionclass_annotation_runtime_semantics
Returns the desired `RuntimeSemantics` for a class's annotations
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:138
↓ 1 callersFunctionclass_as_data_structure
B903
crates/ruff_linter/src/rules/flake8_bugbear/rules/class_as_data_structure.rs:49
↓ 1 callersFunctionclass_attribute_exists_at_runtime
Returns whether a class attribute has any reachable runtime binding.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:921
↓ 1 callersFunctionclass_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:613
↓ 1 callersMethodclass_body_declaration
Finds the annotation governing a new class-body default, without inferring existing defaults. An unannotated binding retains its owner's inherited de
crates/ty_python_semantic/src/types/class.rs:2869
↓ 1 callersFunctionclass_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 callersMethodclass_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 callersFunctionclass_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:906
↓ 1 callersFunctionclass_implementations_for_file
Finds subclasses of `roots` defined in `file`.
crates/ty_python_semantic/src/types/ide_support.rs:467
↓ 1 callersFunctionclass_keyword_config
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:923
↓ 1 callersFunctionclass_mro_literals
( db: &'db dyn Db, class_literal: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types.rs:11564
↓ 1 callersFunctionclass_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:1008
↓ 1 callersMethodclass_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 callersMethodclass_pattern_arguments_for_arm
( &self, kind: &ClassPatternPredicateKind<'db>, context: &ClassPatternContext<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2558
↓ 1 callersFunctionclass_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
← previousnext →8,301–8,400 of 31,562, ranked by callers