MCPcopy Create free account

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

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

↓ 1 callersMethodhas_one_element
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1554
↓ 1 callersMethodhas_only_constructor_items
Return whether every callable uses ordinary constructor binding semantics.
crates/ty_python_semantic/src/types/call/bind.rs:1077
↓ 1 callersMethodhas_only_finite_members
Returns whether structural comparison can avoid recursive member expansion.
crates/ty_python_semantic/src/types/protocol_class.rs:512
↓ 1 callersMethodhas_only_methods
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/protocol_class.rs:507
↓ 1 callersMethodhas_other_values
(&self)
crates/ty_python_semantic/src/types/equality/enums.rs:771
↓ 1 callersMethodhas_own_line_comments
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:866
↓ 1 callersMethodhas_own_ordering_method
Returns `true` if this class defines any ordering method (`__lt__`, `__le__`, `__gt__`, `__ge__`) in its own body (not inherited). Used by `@total_ord
crates/ty_python_semantic/src/types/class.rs:941
↓ 1 callersFunctionhas_parameter
Returns whether or not `definition` is a function definition and contains a parameter with the same name as `section_name`.
crates/ruff_linter/src/docstrings/sections.rs:578
↓ 1 callersFunctionhas_parentheses_and_is_non_empty
It's complicated
crates/ruff_python_formatter/src/pattern/mod.rs:235
↓ 1 callersMethodhas_pending_link
Returns whether a wrapped hyperlink candidate is buffered.
crates/ty_ide/src/docstring/markdown/general/inline.rs:84
↓ 1 callersFunctionhas_post_loop_references
(checker: &Checker, expr: &Expr, loop_end: TextSize)
crates/ruff_linter/src/rules/perflint/rules/manual_dict_comprehension.rs:479
↓ 1 callersFunctionhas_prefix
Returns `true` if the iterator starts with the given prefix.
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs:1025
↓ 1 callersFunctionhas_reflexive_equality_semantics
Return whether equality on `ty` is reflexive and therefore rules out shared identity when false.
crates/ty_python_semantic/src/types/equality.rs:2093
↓ 1 callersFunctionhas_reviewer
(pull: dict[str, Any])
scripts/pull_request_reviewers.py:123
↓ 1 callersMethodhas_rules_for
(&self, source: LintSource)
crates/ruff_linter/src/checkers/ast/mod.rs:3752
↓ 1 callersFunctionhas_safe_decorator
Returns `true` if the function is decorated with `@asynccontextmanager`, `@pytest.fixture`, or `@trio.as_safe_channel`, which are known to handle asyn
crates/ruff_linter/src/rules/flake8_async/rules/yield_in_context_manager_in_async_generator.rs:130
↓ 1 callersMethodhas_same_bodies
Compare the ordered bodies without the iteration metadata used to select them.
crates/ty_python_semantic/src/types/recursive.rs:182
↓ 1 callersMethodhas_same_place_as
Returns `true` if this function's last definition uses the same place as `other`.
crates/ty_python_semantic/src/types/function.rs:1645
↓ 1 callersMethodhas_scope_declaration
Returns whether a `global` or `nonlocal` statement makes this symbol refer to another scope.
crates/ty_python_core/src/symbol.rs:91
↓ 1 callersFunctionhas_simple_shadowed_bindings
(scope: &Scope, id: BindingId, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:926
↓ 1 callersFunctionhas_star_args
(args: &[Expr])
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:570
↓ 1 callersMethodhas_string_literal_completion_candidates
(&self, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7352
↓ 1 callersFunctionhas_top_level_line_break
Returns `true` if an expression contains a line break at the top level. Such expressions need parentheses to remain a single expression statement whe
crates/ruff_linter/src/rules/ruff/rules/unnecessary_if.rs:149
↓ 1 callersFunctionhas_trailing_comma
( parameters: &Parameters, last_node: Option<AnyNodeRef>, source: &str, )
crates/ruff_python_formatter/src/other/parameters.rs:655
↓ 1 callersMethodhas_trailing_comments
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:998
↓ 1 callersMethodhas_trivial_body
Returns `true` if this function has a trivial body. A trivial body is one that consists only of `...`, `pass`, or `raise NotImplementedError`. Metho
crates/ty_python_semantic/src/types/function.rs:1120
↓ 1 callersFunctionhas_unittest_test_methods
Unittest uses `runTest` only when no named test methods are available, including inherited ones.
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:444
↓ 1 callersFunctionhas_unpack_annotation
Returns `true` if the parameter is annotated with `typing.Unpack`
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:1961
↓ 1 callersMethodhas_unparenthesized_leading_comments
Returns `true` if the operand has any leading comments that are not trivia.
crates/ruff_python_formatter/src/expression/binary_like.rs:795
↓ 1 callersMethodhas_unrelated_class
Can neither instance be redundant with the other in a union, regardless of their type arguments? Only ordinary instances are decided by class ancestry
crates/ty_python_semantic/src/types/instance.rs:260
↓ 1 callersFunctionhas_valid_method_arguments
Check if the call has valid arguments for the from_* method
crates/ruff_linter/src/rules/refurb/rules/unnecessary_from_float.rs:245
↓ 1 callersMethodhash
(&self, state: &mut H)
crates/ruff_python_ast/src/name.rs:833
↓ 1 callersMethodhash
(&self, state: &mut H)
crates/ty_python_core/src/member.rs:483
↓ 1 callersFunctionhashlib_digest_hex
FURB181
crates/ruff_linter/src/rules/refurb/rules/hashlib_digest_hex.rs:56
↓ 1 callersFunctionhashlib_insecure_hash_functions
S324
crates/ruff_linter/src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs:93
↓ 1 callersMethodheader_range
Returns the range of the namedtuple call expression.
crates/ty_python_semantic/src/types/class/named_tuple.rs:220
↓ 1 callersMethodheader_range
Returns the range of the class's "header": the class name and any arguments passed to the `class` statement. E.g. ```ignore class Foo(Bar, metaclass=
crates/ty_python_semantic/src/types/class/static_literal.rs:3495
↓ 1 callersMethodheader_range
Returns the range of the `type()` call expression that created this class.
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:245
↓ 1 callersMethodheader_range
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:172
↓ 1 callersMethodheading
Returns the canonical display heading for this section.
crates/ty_ide/src/docstring/document.rs:45
↓ 1 callersFunctionhello
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP025.py:24
↓ 1 callersFunctionhelp_text
Returns the output of `ruff help`.
crates/ruff_dev/src/generate_cli_help.rs:114
↓ 1 callersMethodhide_return_type
(&self)
crates/ty_python_semantic/src/types/display.rs:231
↓ 1 callersMethodhide_snippet
(mut self, yes: bool)
crates/ruff_annotate_snippets/src/snippet.rs:391
↓ 1 callersMethodhint
Returns guidance for fixing the invalid Python requirement, when available.
crates/ty_project/src/metadata/pyproject.rs:163
↓ 1 callersMethodhints
(&self, file_id: &FileHandle)
crates/ty_wasm/src/lib.rs:273
↓ 1 callersMethodhorizontal_line
(self)
crates/ty_ide/src/markup.rs:26
↓ 1 callersFunctionhover
( snapshot: &DocumentSnapshot, position: &types::TextDocumentPositionParams, )
crates/ruff_server/src/server/api/requests/hover.rs:46
↓ 1 callersMethodhover
(&self, file_id: &FileHandle, position: Position)
crates/ty_wasm/src/lib.rs:496
↓ 1 callersMethodhyperlink
(mut self, hyperlink: bool)
crates/ruff_annotate_snippets/src/renderer/mod.rs:276
↓ 1 callersMethodid
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2331
↓ 1 callersMethodid
(self)
crates/ty_python_semantic/src/lint.rs:583
↓ 1 callersMethodidentifier
Return the [`TextRange`] of the identifier in the given function definition. For example, return the range of `f` in: ```python def f(): ... ```
crates/ruff_python_ast/src/identifier.rs:31
↓ 1 callersMethodidentifiers
Iterate over secondary codes, falling back to rule names for rules without codes.
crates/ruff_linter/src/linter.rs:84
↓ 1 callersFunctionidentity
(x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB132.py:36
↓ 1 callersMethodidentity_specialization
Returns a specialization of this generic context where each typevar is mapped to itself.
crates/ty_python_semantic/src/types/generics.rs:922
↓ 1 callersMethodif_chain_start_for_use
Return the state before the enclosing `if` chain for a use in its final `elif` condition. No snapshot is recorded when the chain ends with an `else` b
crates/ty_python_core/src/use_def.rs:1103
↓ 1 callersFunctionif_contains_comments
Returns `true` if the `if` statement contains a comment
crates/ruff_linter/src/rules/ruff/rules/unnecessary_if.rs:167
↓ 1 callersFunctionif_else_block_instead_of_dict_get
SIM401
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_dict_get.rs:86
↓ 1 callersFunctionif_else_block_instead_of_dict_lookup
SIM116
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_dict_lookup.rs:50
↓ 1 callersFunctionif_else_block_instead_of_if_exp
SIM108
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_if_exp.rs:101
↓ 1 callersFunctionif_exp_instead_of_dict_get
SIM401
crates/ruff_linter/src/rules/flake8_simplify/rules/if_else_block_instead_of_dict_get.rs:247
↓ 1 callersFunctionif_exp_instead_of_or_operator
FURB110
crates/ruff_linter/src/rules/refurb/rules/if_exp_instead_of_or_operator.rs:63
↓ 1 callersFunctionif_expr_min_max
FURB136
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:89
↓ 1 callersFunctionif_expr_with_false_true
SIM211
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_ifexp.rs:211
↓ 1 callersFunctionif_expr_with_true_false
SIM210
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_ifexp.rs:153
↓ 1 callersFunctionif_group_fits_on_line
(flat_content: &Content)
crates/ruff_formatter/src/builders.rs:1952
↓ 1 callersFunctionif_has_trailing_comment
Returns `true` if the `if` branch has a trailing own-line comment
crates/ruff_linter/src/rules/ruff/rules/unnecessary_if.rs:187
↓ 1 callersFunctionif_key_in_dict_del
RUF051
crates/ruff_linter/src/rules/ruff/rules/if_key_in_dict_del.rs:51
↓ 1 callersFunctionif_needed
D418
crates/ruff_linter/src/rules/pydocstyle/rules/if_needed.rs:88
↓ 1 callersFunctionif_stmt_min_max
PLR1730, PLR1731
crates/ruff_linter/src/rules/pylint/rules/if_stmt_min_max.rs:86
↓ 1 callersFunctionif_tuple
F634
crates/ruff_linter/src/rules/pyflakes/rules/if_tuple.rs:44
↓ 1 callersFunctionif_with_same_arms
SIM114
crates/ruff_linter/src/rules/flake8_simplify/rules/if_with_same_arms.rs:57
↓ 1 callersMethodignore_decorators
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:102
↓ 1 callersMethodignore_hidden
Whether hidden files should be ignored. The definition of what a hidden file depends on the [`System`](super::System) and can be platform-dependent.
crates/ruff_db/src/system/walk_directory.rs:55
↓ 1 callersFunctionignore_to_walk_directory_error
( error: ::ignore::Error, path: Option<PathBuf>, depth: Option<usize>, )
crates/ruff_db/src/system/os.rs:398
↓ 1 callersMethodignore_var_parameters
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:110
↓ 1 callersMethodignored_comments
(&self)
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:207
↓ 1 callersFunctionignored_formatter_suppression_comment
RUF028
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:79
↓ 1 callersFunctionignores_from_path
Create a set with codes matching the pattern/code pairs.
crates/ruff_linter/src/fs.rs:19
↓ 1 callersMethodimplementation_access
Returns the access that a candidate value must provide for this member. A module-level callable can satisfy an ordinary or static method through dire
crates/ty_python_semantic/src/types/protocol_class.rs:2497
↓ 1 callersFunctionimplementation_docstring
Overload declarations often omit docstrings, while the runtime implementation appears as the last sibling binding for the same symbol. Fall back to th
crates/ty_python_semantic/src/types/definition_resolution.rs:123
↓ 1 callersMethodimplementation_docstring
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/definition_resolution.rs:107
↓ 1 callersMethodimplementations_for_file
Returns implementations contributed by classes defined in `file`. Returns `None` without loading an AST if the source text rules out implementations.
crates/ty_python_semantic/src/types/ide_support.rs:251
↓ 1 callersFunctionimplicit
ISC001, ISC002
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/implicit.rs:107
↓ 1 callersFunctionimplicit_attribute_binding_type
Infer the value written by an attribute definition, including unpacked and iteration targets.
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:365
↓ 1 callersMethodimplicit_attribute_bindings
Separate assignments that establish an attribute from assignments that must first read it. ```python class Counter: def increment(self): self.value +
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:42
↓ 1 callersMethodimplicit_attribute_definition_names
Names assigned to a method's receiver, in sorted order.
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:60
↓ 1 callersFunctionimplicit_builtins_symbol
Looks up `symbol` for implicit builtin fallback. Private type-checking-only definitions are implementation details, but private runtime definitions f
crates/ty_python_semantic/src/place.rs:639
↓ 1 callersFunctionimplicit_class_var_in_dataclass
RUF045
crates/ruff_linter/src/rules/ruff/rules/implicit_classvar_in_dataclass.rs:71
↓ 1 callersFunctionimplicit_namespace_package
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, comment_ranges: &CommentRa
crates/ruff_linter/src/rules/flake8_no_pep420/rules/implicit_namespace_package.rs:76
↓ 1 callersFunctionimplicit_optional
RUF013
crates/ruff_linter/src/rules/ruff/rules/implicit_optional.rs:188
↓ 1 callersFunctionimplicit_return
RET503
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:550
↓ 1 callersFunctionimplicit_return_value
RET502
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:417
↓ 1 callersFunctionimplicit_string_concatenation_in_collection_literal
ISC004
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/collection_literal.rs:72
↓ 1 callersMethodimplies_subtype_of
Returns the constraints under which `lhs` is a subtype of `rhs`, assuming that the constraints in this constraint set hold.
crates/ty_python_semantic/src/types/constraints.rs:671
↓ 1 callersMethodimport
(mut self, edit: impl Into<Option<Edit>>)
crates/ty_ide/src/completion.rs:604
↓ 1 callersMethodimport
(&self, module: &str, member: &str)
crates/ty_ide/src/importer.rs:14
↓ 1 callersMethodimport_completions
Returns completions for symbols available in a `import <CURSOR>` context.
crates/ty_python_semantic/src/semantic_model.rs:186
↓ 1 callersFunctionimport_fixture
Imports a single fixture by writing the input and expected output to the black directory.
crates/ruff_python_formatter/resources/test/fixtures/import_black_tests.py:11
← previousnext →10,101–10,200 of 31,766, ranked by callers