MCPcopy Create free account

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

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

↓ 1 callersFunctioncheck
Run the linter over a collection of files.
crates/ruff/src/commands/check.rs:34
↓ 1 callersFunctioncheck
(checker: &Checker, value: &str, range: TextRange)
crates/ruff_linter/src/rules/flake8_bandit/rules/hardcoded_tmp_directory.rs:87
↓ 1 callersFunctioncheck_airflow_plugin_extension
Check whether a customized Airflow plugin contains removed extensions. For example: ```python from airflow.plugins_manager import AirflowPlugin cl
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1119
↓ 1 callersFunctioncheck_and_remove_from_set
FURB132
crates/ruff_linter/src/rules/refurb/rules/check_and_remove_from_set.rs:72
↓ 1 callersFunctioncheck_apply_defaults_decorator
Check for the use of the `@apply_defaults` decorator. `apply_defaults` is now unconditionally done in Airflow 3.0 and can be safely removed. For exa
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1361
↓ 1 callersMethodcheck_argument_types
(&mut self, constraints: &ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:7875
↓ 1 callersFunctioncheck_assert_in_except
(checker: &Checker, name: &str, body: &[Stmt])
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:288
↓ 1 callersMethodcheck_assert_type
(&self, bindings: &Bindings<'db>, call_expression: &ast::ExprCall)
crates/ty_python_semantic/src/types/infer/builder/function.rs:1542
↓ 1 callersFunctioncheck_ast
( parsed: &Parsed<ModModule>, locator: &Locator, stylist: &Stylist, indexer: &Indexer, noq
crates/ruff_linter/src/checkers/ast/mod.rs:3518
↓ 1 callersMethodcheck_attribute_liskov_violations
(self)
crates/ty_python_semantic/src/types/overrides.rs:2031
↓ 1 callersMethodcheck_attribute_write_requirement
( &self, db: &'db dyn Db, requirement: &AttributeWriteRequirement<'db>, member
crates/ty_python_semantic/src/types/attribute_write.rs:1436
↓ 1 callersMethodcheck_binding_identifier
Checks an identifier of a binding (e.g. `x = 10`)
crates/ty_ide/src/references.rs:738
↓ 1 callersFunctioncheck_blanket_suppressions
(context: &mut CheckSuppressionsContext)
crates/ty_python_semantic/src/suppression.rs:167
↓ 1 callersFunctioncheck_body
Search the body of an if-condition for raises.
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:104
↓ 1 callersFunctioncheck_bytes
(checker: &Checker, literal: &BytesLiteral, module: RegexModule, func: &str)
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:231
↓ 1 callersMethodcheck_call
Evaluate a call to this known function, and emit any diagnostics that are necessary as a result of the call.
crates/ty_python_semantic/src/types/infer/builder/function.rs:1627
↓ 1 callersFunctioncheck_call_arguments
Check whether a removed Airflow argument is passed. For example: ```python from airflow import DAG DAG(schedule_interval="@daily") ```
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:204
↓ 1 callersFunctioncheck_call_arguments
Check whether a removed Airflow argument is passed. For example: ```python from airflow import DAG DAG(sla="@daily") ```
crates/ruff_linter/src/rules/airflow/rules/suggested_to_update_3_0.rs:160
↓ 1 callersMethodcheck_call_site
(&mut self, leaf: CalleeLeaf<'a>, scope_node: AnyNodeRef<'a>)
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:282
↓ 1 callersFunctioncheck_charset_exact
(bytes: &[u8])
crates/ruff_linter/src/rules/refurb/rules/hardcoded_string_charset.rs:93
↓ 1 callersFunctioncheck_class
TODO: Support dynamic class literals. If we allow dynamic classes to define attributes in their namespace dictionary, we should also check whether tho
crates/ty_python_semantic/src/types/overrides.rs:80
↓ 1 callersFunctioncheck_class_attribute
Check whether a removed Airflow class attribute (include property) is called. For example: ```python from airflow.linesage.hook import DatasetLineag
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:300
↓ 1 callersMethodcheck_class_attribute_write
( &self, db: &'db dyn Db, member: &ClassAttributeWriteMember<'db>, value_ty: T
crates/ty_python_semantic/src/types/attribute_write.rs:1589
↓ 1 callersFunctioncheck_class_declaration
( context: &InferContext<'db, '_>, configuration: OverrideRulesConfig, override_class: &OverrideCl
crates/ty_python_semantic/src/types/overrides.rs:729
↓ 1 callersFunctioncheck_class_final_without_value
Check for `Final`-qualified declarations in a class body scope that are never assigned a value.
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:1480
↓ 1 callersFunctioncheck_class_method_typevar_variance
Check that a nominal class's exposed methods respect its declared type-parameter variance. Constructors are excluded because their parameters establis
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:76
↓ 1 callersFunctioncheck_class_namespace_against_metaclass_members
Check compatibility between class namespace values and attributes populated by its metaclass. A binding in a class body is passed through the namespa
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:1270
↓ 1 callersFunctioncheck_class_slots
Rejects slot layouts that fail while Python constructs the runtime class. ```python class Example: __slots__ = ("value",) value = 1 # This class bin
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:70
↓ 1 callersFunctioncheck_classinfo_in_isinstance
Check the second argument to `isinstance()` or `issubclass()` for types that cannot be used at runtime (protocol classes, typed dicts, `typing.Any` in
crates/ty_python_semantic/src/types/infer/builder/function.rs:2189
↓ 1 callersFunctioncheck_code
Return the outcome of checking the input with Ruff or ty.
python/py-fuzzer/fuzz.py:209
↓ 1 callersFunctioncheck_constructor_arguments
( checker: &Checker, qualified_name: &QualifiedName, arguments: &Arguments, func: &Expr, )
crates/ruff_linter/src/rules/airflow/rules/function_signature_change_in_3.rs:177
↓ 1 callersFunctioncheck_context_key_usage_in_call
Checks whether an Airflow 3.0–removed context key is used in a function decorated with `@task`. Specifically, it flags the following two scenarios:
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:421
↓ 1 callersFunctioncheck_context_key_usage_in_subscript
Check if a subscript expression accesses a removed Airflow context variable. If a removed key is found, push a corresponding diagnostic.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:456
↓ 1 callersMethodcheck_declaration_identifier
Checks an identifier that's part of a declaration, e.g. the name of the class.
crates/ty_ide/src/references.rs:748
↓ 1 callersFunctioncheck_decorator
( function_def: &StmtFunctionDef, decorator: &'a Decorator, semantic: &'a SemanticModel, )
crates/ruff_linter/src/rules/fastapi/rules/fastapi_redundant_response_model.rs:108
↓ 1 callersFunctioncheck_decorator_calls
( context: &InferContext<'db, '_>, definition: Definition<'db>, decorators: &[ast::Decorator], )
crates/ty_python_semantic/src/types/infer/builder/post_inference/decorator.rs:10
↓ 1 callersMethodcheck_descriptor_attribute_write
( &self, db: &'db dyn Db, descriptor_ty: Type<'db>, object_ty: Type<'db>,
crates/ty_python_semantic/src/types/attribute_write.rs:1644
↓ 1 callersMethodcheck_division_by_zero
Raise a diagnostic if the given type cannot be divided by zero. Expects the resolved type of the left side of the binary expression.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:1219
↓ 1 callersFunctioncheck_docstring
DOC102, DOC201, DOC202, DOC402, DOC403, DOC501, DOC502
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1231
↓ 1 callersMethodcheck_downstream_constructor
Check types for downstream constructors, if any.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:301
↓ 1 callersFunctioncheck_duplicates
PT014
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:661
↓ 1 callersFunctioncheck_dynamic_class_definition
Iterate over all dynamic class definitions (created using `type()` calls) to check that the definition will not cause an exception to be raised at run
crates/ty_python_semantic/src/types/infer/builder/post_inference/dynamic_class.rs:17
↓ 1 callersFunctioncheck_dynamically_typed
ANN401
crates/ruff_linter/src/rules/flake8_annotations/rules/definition.rs:563
↓ 1 callersFunctioncheck_enum_member_against_constructor_method
Validates an enum member value against an enum constructor method signature. The enum metaclass unpacks tuple values as positional arguments to `__ne
crates/ty_python_semantic/src/types/overrides.rs:2341
↓ 1 callersFunctioncheck_expr
(checker: &Checker, expr: &'a Expr, names: &mut FxHashSet<&'a str>)
crates/ruff_linter/src/rules/pylint/rules/redeclared_assigned_name.rs:64
↓ 1 callersFunctioncheck_expr
(checker: &Checker, target: &Expr, method_type: MethodType)
crates/ruff_linter/src/rules/pylint/rules/self_or_cls_assignment.rs:122
↓ 1 callersMethodcheck_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:175
↓ 1 callersFunctioncheck_file_path
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, comment_ranges: &CommentRa
crates/ruff_linter/src/checkers/filesystem.rs:16
↓ 1 callersFunctioncheck_final_class_abstract_methods
Check that a `@final` class does not have unimplemented abstract methods. A final class cannot be subclassed, so if it inherits abstract methods with
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:1400
↓ 1 callersMethodcheck_final_method_overridden
(self)
crates/ty_python_semantic/src/types/overrides.rs:2047
↓ 1 callersMethodcheck_final_variable_overridden
(self)
crates/ty_python_semantic/src/types/overrides.rs:2067
↓ 1 callersFunctioncheck_final_without_value
Check for `Final`-qualified declarations in module/function scopes that are never assigned a value. Class body scopes are handled separately in `check
crates/ty_python_semantic/src/types/infer/builder/post_inference/final_variable.rs:11
↓ 1 callersMethodcheck_fixed_length_tuple_vs_tuple_spec
( &self, db: &'db dyn Db, source_tuple: &FixedLengthTuple<Type<'db>>, target_t
crates/ty_python_semantic/src/types/tuple.rs:355
↓ 1 callersFunctioncheck_fixture_addfinalizer
PT021
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:969
↓ 1 callersFunctioncheck_fixture_decorator
PT001, PT002, PT003
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:742
↓ 1 callersFunctioncheck_fixture_decorator_name
PT020
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:933
↓ 1 callersFunctioncheck_fixture_marks
PT024, PT025
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:986
↓ 1 callersFunctioncheck_fixture_returns
PT022
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:824
↓ 1 callersMethodcheck_for
(self, checker: &Checker, name: String, range: TextRange)
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:267
↓ 1 callersMethodcheck_fstring_comments
Check `range` for comment tokens, report an `UnsupportedSyntaxError` for each one found, and return whether any comments were found.
crates/ruff_python_parser/src/parser/expression.rs:1603
↓ 1 callersFunctioncheck_function_definition
( context: &InferContext<'db, '_>, definition: Definition<'db>, file_expression_type: &impl Fn(&as
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:33
↓ 1 callersMethodcheck_function_pair
( &self, db: &'db dyn Db, source: FunctionType<'db>, target: FunctionType<'db>
crates/ty_python_semantic/src/types/function.rs:2175
↓ 1 callersFunctioncheck_function_parameters
Check the function parameters for removed context keys. For example: ```python from airflow.decorators import task @task def another_task(execution
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:174
↓ 1 callersFunctioncheck_generic_reorder_fixes_mro
Determine if an `inconsistent-mro` error could be resolved by moving a `Generic[]` base to the end of the bases list. If so, this function will retur
crates/ty_python_semantic/src/types/mro.rs:932
↓ 1 callersMethodcheck_import_from_module_is_resolvable
Resolve and return the module referred to by the `from` clause of an [`ast::StmtImportFrom`] node. For `from package import child`, this returns `pack
crates/ty_python_semantic/src/types/infer/builder/imports.rs:408
↓ 1 callersFunctioncheck_imports
( parsed: &Parsed<ModModule>, locator: &Locator, indexer: &Indexer, directives: &IsortDirectiv
crates/ruff_linter/src/checkers/imports.rs:21
↓ 1 callersFunctioncheck_inherited_conflict
Check the selected attribute against every inherited declaration of that name. Explicit overrides are checked separately. All inherited generic speci
crates/ty_python_semantic/src/types/overrides/attributes.rs:923
↓ 1 callersFunctioncheck_inherited_conflicts
Discover inherited members and select their owners for both kinds of override check. Source declarations, receiver assignments, and slots supply the
crates/ty_python_semantic/src/types/overrides.rs:172
↓ 1 callersFunctioncheck_inherited_method_conflict
Check a source-defined method against the later declarations in the resolved MRO. Both signatures are bound to the subclass receiver. Conflicts alrea
crates/ty_python_semantic/src/types/overrides.rs:350
↓ 1 callersMethodcheck_instance_attribute_write
( &self, db: &'db dyn Db, object_ty: Type<'db>, receiver: Option<Type<'db>>,
crates/ty_python_semantic/src/types/attribute_write.rs:1523
↓ 1 callersFunctioncheck_instance_overrides
Check receiver annotations that introduce declarations outside the class body. Only explicit receiver annotations introduce a new contract; ordinary
crates/ty_python_semantic/src/types/overrides/attributes.rs:731
↓ 1 callersFunctioncheck_interpolated_string
Checks for unnecessary escaped quotes in an f-string or t-string.
crates/ruff_linter/src/rules/flake8_quotes/rules/unnecessary_escaped_quote.rs:119
↓ 1 callersMethodcheck_intersection_pair_via_elements
Fall back to structural disjointness for intersections without an exact finite expansion. An intersection is disjoint from another type if any positi
crates/ty_python_semantic/src/types/relation.rs:3647
↓ 1 callersMethodcheck_invalid_dataclasses
(self)
crates/ty_python_semantic/src/types/overrides.rs:2063
↓ 1 callersMethodcheck_invalid_named_tuple_definitions
(self)
crates/ty_python_semantic/src/types/overrides.rs:2055
↓ 1 callersMethodcheck_invalid_named_tuple_field_overrides
(self)
crates/ty_python_semantic/src/types/overrides.rs:2059
↓ 1 callersFunctioncheck_invalid_suppression
(context: &mut CheckSuppressionsContext)
crates/ty_python_semantic/src/suppression.rs:246
↓ 1 callersMethodcheck_keyword_unpack_key_types
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:9379
↓ 1 callersMethodcheck_keyword_variadic_argument_type
( &mut self, constraints: &ConstraintSetBuilder<'db>, argument_index: usize, a
crates/ty_python_semantic/src/types/call/bind.rs:8159
↓ 1 callersMethodcheck_known_bound_method_pair
( &self, db: &'db dyn Db, source: KnownBoundMethodType<'db>, target: KnownBoun
crates/ty_python_semantic/src/types/method.rs:873
↓ 1 callersFunctioncheck_legacy_positional_only_convention
Check for invalid applications of the pre-PEP-570 positional-only parameter convention.
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:346
↓ 1 callersFunctioncheck_legacy_typevar_defaults
Check whether any legacy `TypeVar` used in a function signature has a default that references an out-of-scope type variable. This check mirrors the c
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:409
↓ 1 callersFunctioncheck_legacy_typevar_ordering
Check that legacy `TypeVar`s without defaults don't follow `TypeVar`s with defaults in a function's generic context. This mirrors the class-level che
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:536
↓ 1 callersMethodcheck_line
( &self, line: &LogicalLineInfo, state: &BlankLinesState, prev_indent_length:
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:834
↓ 1 callersMethodcheck_lines
E301, E302, E303, E304, E305, E306
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:732
↓ 1 callersFunctioncheck_log_record_attr_clash
Check contents of the `extra` argument to logging calls.
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:183
↓ 1 callersFunctioncheck_logical_lines
( tokens: &Tokens, locator: &Locator, indexer: &Indexer, stylist: &Stylist, settings: &Lin
crates/ruff_linter/src/checkers/logical_lines.rs:39
↓ 1 callersFunctioncheck_mark_parentheses
(checker: &Checker, decorator: &Decorator, marker: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/marks.rs:157
↓ 1 callersMethodcheck_meta_protocol_members
Checks the members that a class object must provide to inhabit `type[Protocol]`. Ordinary instance attributes and properties are deliberately absent
crates/ty_python_semantic/src/types/protocol_class.rs:3029
↓ 1 callersFunctioncheck_method
Check whether a removed Airflow class method is called. For example: ```python from airflow.datasets.manager import DatasetManager manager = Datase
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:545
↓ 1 callersFunctioncheck_method_arguments
( checker: &Checker, qualified_name: &QualifiedName, attr: &Identifier, arguments: &Arguments,
crates/ruff_linter/src/rules/airflow/rules/function_signature_change_in_3.rs:153
↓ 1 callersFunctioncheck_method_typevar_variance
( context: &InferContext<'db, '_>, generic_context: GenericContext<'db>, function: FunctionType<'d
crates/ty_python_semantic/src/types/infer/builder/post_inference/function.rs:177
↓ 1 callersFunctioncheck_missing_overrides
( context: &InferContext<'db, '_>, member: &Member<'db>, subclass_scope: ScopeId<'db>, target:
crates/ty_python_semantic/src/types/overrides.rs:2166
↓ 1 callersMethodcheck_missing_overrides
(self)
crates/ty_python_semantic/src/types/overrides.rs:2051
↓ 1 callersFunctioncheck_mode
(checker: &Checker, mode_arg: &Expr)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:107
↓ 1 callersMethodcheck_module
Return `true` if `self` is defined in `module`
crates/ty_python_semantic/src/types/function.rs:2427
↓ 1 callersMethodcheck_module
Return `true` if the module of `self` matches `module`
crates/ty_python_semantic/src/types/class/known.rs:1931
↓ 1 callersFunctioncheck_msg
Check logging messages for violations.
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:152
↓ 1 callersFunctioncheck_name
Check whether a removed Airflow name is used. For example: ```python from airflow.operators import subdag from airflow.operators.subdag import SubDa
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:655
↓ 1 callersFunctioncheck_name
Check whether a removed Airflow name is used. For example: ```python from airflow.operators import timezone from airflow.utils.timezone import conve
crates/ruff_linter/src/rules/airflow/rules/moved_in_3_1.rs:110
← previousnext →8,201–8,300 of 31,562, ranked by callers