MCPcopy Create free account

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

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

↓ 1 callersMethodis_bound_parameter
(&self, _name: &str)
crates/ruff_python_parser/tests/fixtures.rs:716
↓ 1 callersFunctionis_bound_to_tuple
Returns `true` if the expression definitively resolves to a tuple (e.g., `x` in `x = (1, 2)`).
crates/ruff_linter/src/rules/flake8_pie/rules/multiple_starts_ends_with.rs:240
↓ 1 callersMethodis_break_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1184
↓ 1 callersFunctionis_builtin_exception
Returns `true` if the given expression is a builtin exception. This function only matches to a subset of the builtin exceptions, and omits `TypeError
crates/ruff_linter/src/rules/tryceratops/rules/type_check_without_type_error.rs:118
↓ 1 callersFunctionis_builtin_exception
Returns `true` if the given expression is a builtin exception.
crates/ruff_linter/src/rules/pylint/rules/useless_exception_statement.rs:79
↓ 1 callersFunctionis_builtin_literal_type
Return whether `ty` is handled by [`builtin_literal_constraint`]. This includes `int`, `bool`, `str`, and `bytes` literals, along with `bool` itself
crates/ty_python_semantic/src/types/equality.rs:967
↓ 1 callersMethodis_builtins
(self)
crates/ty_module_resolver/src/module.rs:432
↓ 1 callersFunctionis_builtins_super
Returns `true` if the call is to the built-in `builtins.super` function.
crates/ruff_linter/src/rules/pyupgrade/rules/super_call_with_parameters.rs:318
↓ 1 callersFunctionis_bytes
Test whether the given binding can be considered an instance of `bytes`.
crates/ruff_python_semantic/src/analyze/typing.rs:1089
↓ 1 callersMethodis_bytes_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2355
↓ 1 callersFunctionis_cache_func
Returns `true` if the given expression is a call to `functools.lru_cache` or `functools.cache`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/cached_instance_method.rs:121
↓ 1 callersFunctionis_call_insecure
(call: &ast::ExprCall)
crates/ruff_linter/src/rules/flake8_bandit/rules/django_extra.rs:63
↓ 1 callersFunctionis_call_to_enum_auto
(semantic: &SemanticModel, expr: &Expr)
crates/ruff_linter/src/rules/flake8_pie/rules/non_unique_enums.rs:105
↓ 1 callersMethodis_callable
Return true if this special form is callable at runtime. Most special forms are not callable (they are type constructors that are subscripted), but so
crates/ty_python_semantic/src/types/special_form.rs:571
↓ 1 callersMethodis_cancelled
(&self)
crates/ruff_db/src/cancellation.rs:45
↓ 1 callersMethodis_cancelled
Returns true if the request was cancelled.
crates/ruff_server/src/session/request_queue.rs:145
↓ 1 callersMethodis_candidate_word
Return `true` if the flags indicate that the word is a candidate for flagging ambiguous unicode characters. We follow VS Code's logic for determining
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:317
↓ 1 callersMethodis_catch_all
(&self)
crates/ty_python_core/src/builder/except_handlers.rs:33
↓ 1 callersMethodis_changed
(&self)
crates/ty_project/src/watch.rs:124
↓ 1 callersFunctionis_charlie
(t: Kind)
crates/ruff_benchmark/resources/typeis_narrowing.py:158
↓ 1 callersFunctionis_charlie_wide
(t: Kind)
crates/ruff_benchmark/resources/typeis_narrowing.py:174
↓ 1 callersMethodis_checkable
(&self)
crates/mdtest/src/parser.rs:431
↓ 1 callersMethodis_class_body_global_fallback
Returns whether this source is the module fallback for a class-local name.
crates/ty_python_semantic/src/place_load.rs:948
↓ 1 callersMethodis_class_function_or_decorator
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:1117
↓ 1 callersMethodis_class_method
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2468
↓ 1 callersMethodis_class_name_reassigned
Returns `true` if the given class definition's name was previously bound in the same scope (i.e., the class definition is a re-assignment).
crates/ty_python_semantic/src/semantic_model.rs:389
↓ 1 callersFunctionis_class_or_function_definition
Returns `true` if a [`Stmt`] is a class or function definition.
crates/ruff_python_formatter/src/statement/suite.rs:761
↓ 1 callersFunctionis_class_reference
Return true if `annotation` is either `ClassName` or `type[ClassName]`
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:287
↓ 1 callersMethodis_class_subtype
Checks class subtyping without discarding the active recursive relation state.
crates/ty_python_semantic/src/types/relation.rs:1404
↓ 1 callersFunctionis_classmethod
Returns `true` if a function is a "class method".
crates/ruff_python_semantic/src/analyze/visibility.rs:23
↓ 1 callersMethodis_cli
(self)
crates/mdtest/src/lib.rs:180
↓ 1 callersMethodis_closed_by
Returns whether `line` closes this fenced code block.
crates/ty_ide/src/docstring/document/preformatted.rs:43
↓ 1 callersFunctionis_closing_code_fence
(line: &str, opening_fence: &str)
crates/ruff_markdown/src/lib.rs:49
↓ 1 callersMethodis_code_cell
(&self)
crates/ruff_notebook/src/cell.rs:33
↓ 1 callersFunctionis_collapsible_if_fix_safe_enabled
https://github.com/astral-sh/ruff/pull/24371
crates/ruff_linter/src/preview.rs:338
↓ 1 callersMethodis_collections
(self)
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:763
↓ 1 callersMethodis_commutative
Returns `true` if the operator is commutative.
crates/ruff_linter/src/rules/pylint/rules/non_augmented_assignment.rs:202
↓ 1 callersMethodis_compatible_with
(self, data_type: PythonType)
crates/ruff_linter/src/rules/pylint/rules/bad_string_format_type.rs:53
↓ 1 callersMethodis_complex
(&self)
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_numeric_union.rs:271
↓ 1 callersFunctionis_complex_number
Returns `true` if the given expression is a complex number literal.
crates/ruff_python_parser/src/parser/pattern.rs:831
↓ 1 callersFunctionis_composite_condition
Check if the test expression is a composite condition, and whether it can be split into multiple independent conditions. For example, `a and b` or `n
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:639
↓ 1 callersFunctionis_comprehension_with_min_max_sum_enabled
https://github.com/astral-sh/ruff/pull/10759
crates/ruff_linter/src/preview.rs:40
↓ 1 callersMethodis_configuration
(&self, path: &SystemPath, project_root: &SystemPath)
crates/ty_project/src/db/changes.rs:486
↓ 1 callersMethodis_conjunction_separated
(self)
crates/ty_ide/src/docstring/document/google.rs:182
↓ 1 callersFunctionis_constant
Return `true` if the [`Expr`] is a literal or tuple of literals.
crates/ruff_python_ast/src/helpers.rs:824
↓ 1 callersFunctionis_constant_like
Returns `true` if the expression can be shared across multiple values. When converting from `{key: value for key in iterable}` to `dict.fromkeys(iter
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_dict_comprehension_for_iterable.rs:182
↓ 1 callersFunctionis_container
(value: object, other: T)
crates/ty_python_semantic/resources/corpus/recursive_annotated_narrowing.py:9
↓ 1 callersFunctionis_container
Detects whether the current process is running inside a container. Checks for Docker (`/.dockerenv`), Podman (`/run/.containerenv`), and various cont
crates/ruff_linter/src/rules/flake8_executable/helpers.rs:48
↓ 1 callersFunctionis_context_key_access
Check if an expression accesses a specific context key. It returns `true` if `expr` accesses the given `key` from an Airflow context variable via eith
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1263
↓ 1 callersFunctionis_contiguous_from_end
We can only fix if the positional arguments we're removing don't require re-indexing the format string itself. For example, we can't fix `"{1}{2}".for
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:875
↓ 1 callersMethodis_continuation
Returns `true` if the given offset is part of a continuation line.
crates/ruff_python_index/src/indexer.rs:126
↓ 1 callersMethodis_covered_by
Proves coverage using existing TDD branches, without constructing another diagram. This is deliberately incomplete: a branch must be covered by one t
crates/ty_python_semantic/src/types/constraints.rs:2278
↓ 1 callersMethodis_created
(&self)
crates/ty_project/src/watch.rs:120
↓ 1 callersFunctionis_ctypes_structure_fields
Returns `true` if the class has `ctypes.Structure` as a base and the first target is the `_fields_` attribute.
crates/ruff_linter/src/rules/ruff/helpers.rs:246
↓ 1 callersMethodis_current_scope
Return `true` if the given [`ScopeId`] matches that of the current scope.
crates/ruff_python_semantic/src/model.rs:1832
↓ 1 callersFunctionis_custom_exception
Returns `true` if the given expression is a custom exception.
crates/ruff_linter/src/rules/pylint/rules/useless_exception_statement.rs:93
↓ 1 callersFunctionis_custom_exception_checking_enabled
https://github.com/astral-sh/ruff/pull/21382
crates/ruff_linter/src/preview.rs:30
↓ 1 callersFunctionis_dag_file
Returns `true` if the file imports `DAG` or `dag` from airflow, which indicates it is a Dag definition file.
crates/ruff_linter/src/rules/airflow/rules/variable_get_outside_task.rs:110
↓ 1 callersFunctionis_dag_or_task_constructor
Check if the qualified name refers to a Dag constructor, `@dag` decorator, operator, sensor, or `@task` decorator.
crates/ruff_linter/src/rules/airflow/rules/runtime_value_in_dag_or_task.rs:86
↓ 1 callersMethodis_dataclass_like
(self)
crates/ty_python_semantic/src/types/class.rs:333
↓ 1 callersFunctionis_dataclass_meta_annotation
Returns `true` if an annotation will be inspected at runtime by the `dataclasses` module. Specifically, detects whether an annotation is to either `d
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:245
↓ 1 callersMethodis_dataclasses
(self)
crates/ty_module_resolver/src/module.rs:464
↓ 1 callersFunctionis_debugger_import
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_debugger/rules/debugger.rs:113
↓ 1 callersMethodis_declaration
(&self, covering_node: &CoveringNode<'_>)
crates/ty_ide/src/references.rs:1029
↓ 1 callersMethodis_declared
Is the symbol declared in its containing scope?
crates/ty_python_core/src/symbol.rs:76
↓ 1 callersMethodis_default
Returns true if this is the default workspace.
crates/ruff_server/src/workspace.rs:120
↓ 1 callersMethodis_deferred_name_load
(&self, name: &ast::ExprName)
crates/ty_python_semantic/src/types/infer.rs:1060
↓ 1 callersMethodis_definitely_non_data_descriptor_impl
( self, db: &'db dyn Db, program: Program<'db>, )
crates/ty_python_semantic/src/types.rs:5623
↓ 1 callersFunctionis_definitely_side_effect_free_interpolation_expr
(expr: &Expr)
crates/ruff_python_ast/src/helpers.rs:191
↓ 1 callersMethodis_deleted
(&self)
crates/ty_project/src/watch.rs:128
↓ 1 callersMethodis_deletion
(&self, sm: &SourceMap<'_>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:784
↓ 1 callersFunctionis_delta
(t: Kind)
crates/ruff_benchmark/resources/typeis_narrowing.py:162
↓ 1 callersMethodis_derived
(self)
crates/ty_python_semantic/src/types/constraints/paths.rs:175
↓ 1 callersFunctionis_descriptor_class
Returns `true` if the given function is an instantiation of a class that implements the descriptor protocol. See: <https://docs.python.org/3/referenc
crates/ruff_linter/src/rules/ruff/helpers.rs:229
↓ 1 callersMethodis_destructive_replacement
Whether this is a replacement that overwrites source with a snippet in a way that isn't a superset of the original string. For example, replacing "abc
crates/ruff_annotate_snippets/src/renderer/source_map.rs:796
↓ 1 callersFunctionis_dict_expression
Check if an expression is a dictionary.
crates/ruff_linter/src/rules/airflow/rules/function_signature_change_in_3.rs:205
↓ 1 callersFunctionis_dict_items
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension.rs:215
↓ 1 callersMethodis_dict_key
Returns whether the string literal currently being visited is a *key of `dict`, as opposed to one of its values.
crates/ty_ide/src/references.rs:957
↓ 1 callersFunctionis_dict_key_tuple_with_two_elements
Returns true if the binding is a dictionary where each key is a tuple with two elements.
crates/ruff_linter/src/rules/pylint/rules/dict_iter_missing_items.rs:107
↓ 1 callersMethodis_digit
(self, c: char)
crates/ruff_python_parser/src/lexer.rs:1507
↓ 1 callersFunctionis_direct_dependency
( db: &'db dyn Db, importing_file: ProgramFile<'db>, imported_module: Module<'db>, )
crates/ty_python_semantic/src/dependency.rs:116
↓ 1 callersFunctionis_direct_range_call
Returns `true` for syntactically direct `range(...)` calls. This avoids adding reachability predicates for every `for` loop target to the TDD graph.
crates/ty_python_core/src/builder.rs:6225
↓ 1 callersMethodis_directory
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:110
↓ 1 callersMethodis_disabled
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:574
↓ 1 callersMethodis_disallowed
(self)
crates/ruff_python_semantic/src/model.rs:2615
↓ 1 callersMethodis_disjoint_from
Return true if `self & other` should simplify to `Never`: if the intersection of the two types could never be inhabited by any possible runtime value.
crates/ty_python_semantic/src/types/relation.rs:1106
↓ 1 callersMethodis_disjoint_from
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, other: Self, c
crates/ty_python_semantic/src/types/generics.rs:1684
↓ 1 callersFunctionis_django_model_import
Returns `true` if a statement appears to be a dynamic import of a Django model. For example, in Django, it's common to use `get_model` to access a mo
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:108
↓ 1 callersFunctionis_docstring_section
( line: &Line, indent_size: TextSize, section_name_size: TextSize, section_kind: SectionKind,
crates/ruff_linter/src/docstrings/sections.rs:451
↓ 1 callersMethodis_doctest
(&self)
crates/ty_ide/src/docstring/markdown/general.rs:495
↓ 1 callersMethodis_done
(&self)
crates/ruff_formatter/src/printer/queue.rs:278
↓ 1 callersMethodis_dot
(self)
crates/ruff_python_ast/src/token.rs:336
↓ 1 callersFunctionis_dtype
Returns `true` if the [`Expr`] appears to be a reference to a NumPy dtype, since: > `dtype` are a bit of a strange beast, but definitely best thought
crates/ruff_linter/src/rules/pycodestyle/rules/type_comparison.rs:196
↓ 1 callersFunctionis_dunder_all
Checks if the given expression is a name expression for `__all__`.
crates/ty_python_semantic/src/dunder_all.rs:444
↓ 1 callersFunctionis_dunder_init_fix_unused_import_enabled
https://github.com/astral-sh/ruff/pull/11436 https://github.com/astral-sh/ruff/pull/11168
crates/ruff_linter/src/preview.rs:210
↓ 1 callersMethodis_dunder_paramspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:890
↓ 1 callersFunctionis_dunder_version
(expr: &ast::Expr)
crates/ruff_linter/src/rules/ruff/rules/map_int_version_parsing.rs:135
↓ 1 callersFunctionis_dunder_version_split
(func: &ast::Expr)
crates/ruff_linter/src/rules/ruff/rules/map_int_version_parsing.rs:123
↓ 1 callersFunctionis_dunder_version_split_dot
Whether `expr` has the form `__version__.split(".")` or `something.__version__.split(".")`.
crates/ruff_linter/src/rules/ruff/rules/map_int_version_parsing.rs:95
↓ 1 callersFunctionis_e402_fix_enabled
https://github.com/astral-sh/ruff/pull/22212
crates/ruff_linter/src/preview.rs:323
← previousnext →10,701–10,800 of 31,766, ranked by callers