MCPcopy Create free account

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

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

↓ 1 callersMethodis_pep695_typevar
(self)
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:479
↓ 1 callersFunctionis_pep_593_generic_member
Returns `true` if a name matches that of a generic from [PEP 593] (e.g. `Annotated`). See: <https://docs.python.org/3/library/typing.html> [PEP 593]
crates/ruff_python_stdlib/src/typing.rs:229
↓ 1 callersFunctionis_pkg_resources_declare_namespace
Check for `__import__('pkg_resources').declare_namespace(__name__)`
crates/ty_module_resolver/src/resolve.rs:1806
↓ 1 callersFunctionis_pkgutil_extend_path
Check for `__path__ = pkgutil.extend_path(__path__, __name__)` or `__path__ = __import__("pkgutil").extend_path(__path__, __name__)`
crates/ty_module_resolver/src/resolve.rs:1726
↓ 1 callersFunctionis_plural_ngettext_check_enabled
https://github.com/astral-sh/ruff/pull/21078
crates/ruff_linter/src/preview.rs:281
↓ 1 callersMethodis_potential_explicit_enum_member
Returns `true` if `elt` could be an explicit `(name, value)` member pair. This is used when the name position is not a known string literal, but is s
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:854
↓ 1 callersFunctionis_pragma_comment
Returns `true` if a comment appears to be a pragma comment. ``` assert!(ruff_python_trivia::is_pragma_comment("# type: ignore")); assert!(ruff_python
crates/ruff_python_trivia/src/pragmas.rs:14
↓ 1 callersMethodis_preferred
(self)
crates/ruff_python_formatter/src/options.rs:387
↓ 1 callersMethodis_present
(self)
crates/ty_python_semantic/src/types/enums.rs:102
↓ 1 callersFunctionis_printf_format
Return `true` if `expr` is a printf-style formatting expression, such as `"%s" % 123`.
crates/ruff_linter/src/rules/flake8_gettext/rules/printf_in_gettext_func_call.rs:86
↓ 1 callersMethodis_prioritized_over
Returns true if this import statement kind should be prioritized over the one given. This assumes that `self` occurs before `other` in the source cod
crates/ty_python_semantic/src/importer.rs:987
↓ 1 callersFunctionis_private_module
Returns `true` if a module name indicates private visibility.
crates/ruff_python_semantic/src/analyze/visibility.rs:152
↓ 1 callersMethodis_property
(&self, extra_properties: P, semantic: &SemanticModel)
crates/ruff_python_semantic/src/definition.rs:154
↓ 1 callersMethodis_property
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2475
↓ 1 callersMethodis_prose
(&self)
crates/ty_ide/src/docstring/markdown/general.rs:480
↓ 1 callersMethodis_protocol_instance
Returns `true` if `self` is [`Type::ProtocolInstance`].
crates/ty_python_semantic/src/types.rs:2636
↓ 1 callersMethodis_provisional
Whether this result depends on provisional types from cycle recovery.
crates/ty_python_semantic/src/types/infer.rs:2170
↓ 1 callersFunctionis_pt020_fix_enabled
https://github.com/astral-sh/ruff/pull/27993
crates/ruff_linter/src/preview.rs:328
↓ 1 callersMethodis_public
(self)
crates/ty_python_core/src/scope.rs:188
↓ 1 callersFunctionis_public_module
Returns `true` if a module name indicates public visibility.
crates/ruff_python_semantic/src/analyze/visibility.rs:147
↓ 1 callersFunctionis_pure_path_subclass_with_preview
Check if the given segments represent a pathlib Path subclass or `PackagePath` with preview mode support. In stable mode, only checks for `Path` and `
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:26
↓ 1 callersFunctionis_pydantic_base_model
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:439
↓ 1 callersFunctionis_pytest_hookimpl_wrapper
Returns `true` if the decorator is `@pytest.hookimpl(wrapper=True)` or `@pytest.hookimpl(hookwrapper=True)`. These hook wrappers intentionally use `r
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:54
↓ 1 callersFunctionis_pytest_importorskip
Returns `true` if a [`Stmt`] is a `pytest.importorskip()` call, as in: ```python import pytest pytest.importorskip("foo.bar") ```
crates/ruff_python_semantic/src/analyze/imports.rs:115
↓ 1 callersFunctionis_pytest_warns
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/warns.rs:165
↓ 1 callersMethodis_python_domain_cross_reference
Returns whether this is a Sphinx Python-domain cross-reference role. For example, this returns `true` for `class`, `py:func`, and `external+python:py
crates/ty_ide/src/docstring/document/syntax.rs:221
↓ 1 callersFunctionis_python_identifier_start
Return `true` if the given character starts a valid Python identifier. Python identifiers must start with an alphabetic character or an underscore.
crates/ruff_python_ast/src/identifier.rs:135
↓ 1 callersMethodis_raise_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:851
↓ 1 callersMethodis_range_in_type_checking_block
(&self, range: TextRange)
crates/ty_python_core/src/use_def.rs:1188
↓ 1 callersFunctionis_re_compile
Returns `true` if `func` resolves to `re.compile`.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression_compile.rs:114
↓ 1 callersFunctionis_reachability_checkpoint
Selects sparse, stable checkpoints without adding a second scope-wide predicate index. Statement calls retain their existing checkpoint spacing. Othe
crates/ty_python_semantic/src/reachability.rs:817
↓ 1 callersFunctionis_real_number
Returns `true` if the given expression is a real number literal or a unary addition or subtraction of a real number literal.
crates/ruff_python_parser/src/parser/pattern.rs:815
↓ 1 callersFunctionis_recognized_all_assignment
(stmt: &ast::Stmt, name: &ast::ExprName)
crates/ty_ide/src/symbols.rs:1636
↓ 1 callersMethodis_recursive
Returns whether this alias can refer back to its own definition.
crates/ty_python_semantic/src/types/cyclic.rs:797
↓ 1 callersMethodis_recursive_reference
(&self, db: &'db dyn Db, function: FunctionType<'db>)
crates/ty_python_semantic/src/types/callable.rs:501
↓ 1 callersFunctionis_redirected_suppression_code_enabled
https://github.com/astral-sh/ruff/issues/26282
crates/ruff_linter/src/preview.rs:311
↓ 1 callersFunctionis_redundant_boolean_comparison
(op: CmpOp, comparator: &Expr)
crates/ruff_linter/src/rules/pycodestyle/rules/literal_comparisons.rs:171
↓ 1 callersFunctionis_redundant_keyword
Returns `true` if the keyword argument is redundant for the given builtin.
crates/ruff_linter/src/rules/pyupgrade/rules/native_literals.rs:171
↓ 1 callersFunctionis_relevant_module
Returns `true` if the module may contain deprecated imports.
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs:109
↓ 1 callersFunctionis_removed_context_key_attribute
Check for removed attributes on context key values. Returns `true` if `attr_expr` accesses a removed attribute on a context key value, which can be u
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1325
↓ 1 callersMethodis_replacement
(&self, sm: &SourceMap<'_>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:788
↓ 1 callersFunctionis_reserved_attr
Returns `true` if the attribute is a reserved attribute on the `logging` module's `LogRecord` class.
crates/ruff_linter/src/rules/flake8_logging_format/rules/logging_call.rs:123
↓ 1 callersFunctionis_resolve_string_annotation_pyi041_enabled
https://github.com/astral-sh/ruff/pull/19023
crates/ruff_linter/src/preview.rs:291
↓ 1 callersFunctionis_response_file
(arg: &OsStr)
crates/ruff_command_line/src/lib.rs:43
↓ 1 callersFunctionis_rest_directive_marker
(line: &str)
crates/ty_ide/src/docstring/document/syntax.rs:486
↓ 1 callersMethodis_right_associative
Returns `true` if the precedence is right-associative i.e., the operations are evaluated from right to left.
crates/ruff_python_ast/src/operator_precedence.rs:138
↓ 1 callersMethodis_rsplit
(self)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:61
↓ 1 callersFunctionis_rst_option
Returns true if this line looks like a reStructuredText option in a field list. That is, a line that looks like `:name: optional-value`.
crates/ruff_python_formatter/src/string/docstring.rs:1877
↓ 1 callersFunctionis_rst_section_adornment
(line: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:470
↓ 1 callersFunctionis_rule_categories_enabled
https://github.com/astral-sh/ruff/pull/27666
crates/ruff_linter/src/preview.rs:365
↓ 1 callersFunctionis_s103_extended_dangerous_bits_enabled
https://github.com/astral-sh/ruff/issues/18863
crates/ruff_linter/src/preview.rs:25
↓ 1 callersFunctionis_same_class_instance
Check for the following cases: Parameter annotation: ```python class C[T]: def f(self, other: C): ... def f(self, other: C[...]): ... def f(self, ot
crates/ruff_linter/src/rules/flake8_self/rules/private_member_access.rs:190
↓ 1 callersFunctionis_same_dict
(test: &Dict, del: &Dict)
crates/ruff_linter/src/rules/ruff/rules/if_key_in_dict_del.rs:134
↓ 1 callersFunctionis_same_expr
Return `true` if the two expressions are equivalent, and both consistent solely of tuples and names.
crates/ruff_linter/src/rules/pyupgrade/rules/yield_in_for_loop.rs:171
↓ 1 callersMethodis_same_file
(&self, first: &SystemPath, second: &SystemPath)
crates/ty_server/src/system.rs:186
↓ 1 callersMethodis_same_item
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/display.rs:64
↓ 1 callersFunctionis_same_key
(test: &Key, del: &Key)
crates/ruff_linter/src/rules/ruff/rules/if_key_in_dict_del.rs:110
↓ 1 callersMethodis_saturated
Returns whether new constraint combinations may lose precision at the arena limit.
crates/ty_python_core/src/reachability_constraints.rs:199
↓ 1 callersFunctionis_script_tag_start
Returns `true` if the line appears to start a script tag. See: <https://peps.python.org/pep-0723/>
crates/ruff_linter/src/rules/eradicate/rules/commented_out_code.rs:158
↓ 1 callersMethodis_self_like_constructor_return_typevar
Is a type variable returned from a constructor method a representation of the self type? Handles `typing.Self` annotations and `__new__` methods retu
crates/ty_python_semantic/src/types/call/bind/constructor.rs:823
↓ 1 callersFunctionis_semantically_allowed_func_call
Returns `true` if a call is semantically allowed to use a boolean trap.
crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs:54
↓ 1 callersFunctionis_sequential
Returns true if the indices are sequential.
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:125
↓ 1 callersMethodis_set_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1874
↓ 1 callersMethodis_set_literal
(self)
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_slots.rs:332
↓ 1 callersFunctionis_set_method
(func: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/refurb/rules/single_item_membership_test.rs:147
↓ 1 callersMethodis_shutdown_requested
(&self)
crates/ruff_server/src/session.rs:91
↓ 1 callersMethodis_simple
A simple type variable has no bound, constraints, or default.
crates/ty_python_semantic/src/types/typevar.rs:358
↓ 1 callersFunctionis_simple_call
Figure out if `expr` represents a "simple" call (i.e. one that can be safely converted to a formatted value).
crates/ruff_linter/src/rules/flynt/helpers.rs:27
↓ 1 callersFunctionis_simple_callee
Figure out if `func` represents a "simple" callee (a bare name, or a chain of simple attribute accesses).
crates/ruff_linter/src/rules/flynt/helpers.rs:47
↓ 1 callersFunctionis_simple_expr
Determines whether this expression needs a space around the colon <https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slic
crates/ruff_python_formatter/src/expression/expr_slice.rs:194
↓ 1 callersFunctionis_simple_power_expression
(left: &Expr, right: &Expr, context: &PyFormatContext)
crates/ruff_python_formatter/src/expression/binary_like.rs:463
↓ 1 callersFunctionis_simple_power_operand
Return `true` if an [`Expr`] adheres to [Black's definition](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-break
crates/ruff_python_formatter/src/expression/binary_like.rs:472
↓ 1 callersFunctionis_single_argument_parenthesized
Returns `true` if the pattern (which is the only argument to a [`PatternMatchClass`](ruff_python_ast::PatternMatchClass)) is parenthesized. Used to av
crates/ruff_python_formatter/src/pattern/pattern_arguments.rs:81
↓ 1 callersFunctionis_single_argument_parenthesized
(argument: &Expr, call_end: TextSize, source: &str)
crates/ruff_python_formatter/src/other/arguments.rs:117
↓ 1 callersMethodis_single_conjunction
Checks whether this BDD represents a single conjunction (of an arbitrary number of positive or negative constraints).
crates/ty_python_semantic/src/types/constraints.rs:2410
↓ 1 callersMethodis_single_expression
(&self, expression: ExpressionNodeKey, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:13075
↓ 1 callersFunctionis_single_member_import
Return `true` if changing `lazy` affects only one imported name.
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_immediately_resolved.rs:153
↓ 1 callersFunctionis_singledispatch_interface
Returns `true` if a function is registered as a `singledispatch` or `singledispatchmethod` interface. For example, `fun` below is a `singledispatch`
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:284
↓ 1 callersFunctionis_singleton
Return `true` if the [`Expr`] is a singleton (`None`, `True`, `False`, or `...`).
crates/ruff_python_ast/src/helpers.rs:816
↓ 1 callersMethodis_singleton
(&self, db: &'db dyn Db, members_are_exhaustive: bool)
crates/ty_python_semantic/src/types/equality/enums.rs:574
↓ 1 callersFunctionis_site_sys_path_modification
Returns `true` if a [`Stmt`] is a dynamic modification of the Python module search path, e.g., ```python import site site.addsitedir(...) ```
crates/ruff_python_semantic/src/analyze/imports.rs:133
↓ 1 callersFunctionis_skip_file_prefixes_param_set
Returns `true` if `skip_file_prefixes` is set to its non-default value. The default value of `skip_file_prefixes` is an empty tuple.
crates/ruff_linter/src/rules/flake8_bugbear/rules/no_explicit_stacklevel.rs:109
↓ 1 callersMethodis_slice_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2762
↓ 1 callersFunctionis_slots_assignment
Returns whether `node` assigns `value` to the sole target `__slots__`, e.g. `__slots__ = (...)` or `__slots__: tuple = (...)`.
crates/ty_ide/src/references.rs:285
↓ 1 callersFunctionis_snake_case_type_alias
Return `true` if the given name is a `snake_case` type alias. In this context, we match against any name that begins with an optional underscore, foll
crates/ruff_linter/src/rules/flake8_pyi/rules/type_alias_naming.rs:87
↓ 1 callersMethodis_space
Returns `true` if this is an [`IndentStyle::Space`].
crates/ruff_formatter/src/lib.rs:81
↓ 1 callersMethodis_spaces_tabs
(self)
crates/ruff_python_formatter/src/string/docstring.rs:1839
↓ 1 callersFunctionis_special_attribute
Return `true` if the given [`Expr`] is a special class attribute, like `__slots__`. While `__slots__` is typically defined via a tuple, Python accept
crates/ruff_linter/src/rules/ruff/helpers.rs:10
↓ 1 callersMethodis_special_form
(self)
crates/ty_python_semantic/src/types/class/known.rs:315
↓ 1 callersMethodis_specified
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:570
↓ 1 callersMethodis_spellable
Return `true` if users can spell an equivalent type for this complement.
crates/ty_python_semantic/src/types/enums.rs:893
↓ 1 callersFunctionis_splittable_expression
Returns `true` if `expr` is an expression that can be split into multiple lines. Returns `false` for expressions that are guaranteed to never split.
crates/ruff_python_formatter/src/expression/mod.rs:1351
↓ 1 callersFunctionis_standalone_mock_non_existent_enabled
https://github.com/astral-sh/ruff/pull/22830
crates/ruff_linter/src/preview.rs:271
↓ 1 callersFunctionis_standard_library_generic
Returns `true` if a call path is a generic from the Python standard library (e.g. `list`, which can be used as `list[int]`). See: <https://docs.pytho
crates/ruff_python_stdlib/src/typing.rs:5
↓ 1 callersFunctionis_standard_library_generic_member
Returns `true` if a name matches that of a generic from the Python standard library (e.g. `list` or `Set`). See: <https://docs.python.org/3/library/t
crates/ruff_python_stdlib/src/typing.rs:150
↓ 1 callersMethodis_standard_mapping_get
Identify `dict.get` and `Mapping.get` by their definitions, even when the receiver has been narrowed to an intersection and no longer has a single nom
crates/ty_python_semantic/src/types/narrow.rs:2939
↓ 1 callersMethodis_star
(&self)
crates/ty_python_core/src/definition.rs:1630
↓ 1 callersMethodis_starred_expression_allowed
Returns `true` if starred expressions are allowed.
crates/ruff_python_parser/src/parser/expression.rs:3219
↓ 1 callersMethodis_start_of_file
Returns `true` if this line is positioned at the start of the file.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:121
↓ 1 callersFunctionis_static_length
(elts: &[Expr])
crates/ruff_linter/src/rules/flynt/rules/static_join_to_fstring.rs:69
← previousnext →11,101–11,200 of 31,766, ranked by callers