MCPcopy Create free account

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

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

↓ 1 callersFunctionhas_nested_block
Returns `true` if the given statement is a leaf node.
crates/ruff_linter/src/rules/pylint/rules/too_many_nested_blocks.rs:97
↓ 1 callersMethodhas_nested_gradual_evidence
( &self, formal: Type<'db>, actual: Type<'db>, seen_classes: &RefCell<FxHashSe
crates/ty_python_semantic/src/types/generics.rs:4080
↓ 1 callersFunctionhas_nested_union
Returns `true` if a union expression contains nested sub-unions that would need to be flattened by a fix. For PEP 604 unions (`a | b | c`), the AST i
crates/ruff_linter/src/rules/ruff/rules/none_not_at_end_of_union.rs:60
↓ 1 callersMethodhas_no_syntax_errors
Returns `true` if the parsed source code does not contain any [`ParseError`]s *or [`UnsupportedSyntaxError`]s. See [`Parsed::has_valid_syntax`] for a
crates/ruff_python_parser/src/lib.rs:455
↓ 1 callersMethodhas_no_valid_solutions
Returns whether no specialization satisfying the type variables' upper bounds and constraints can satisfy this constraint set. Unlike [`Self::is_neve
crates/ty_python_semantic/src/types/constraints.rs:583
↓ 1 callersFunctionhas_non_default_output_target
( semantic: &SemanticModel, call: &ast::ExprCall, keyword: &str, )
crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs:164
↓ 1 callersMethodhas_non_self_typevar
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:110
↓ 1 callersFunctionhas_non_trivia_tokens_till
Returns `true` if there are any non-trivia tokens from the given token iterator till the given end offset.
crates/ruff_linter/src/rules/pycodestyle/rules/compound_statements.rs:318
↓ 1 callersMethodhas_nonempty_slots
Returns whether this class definitely introduces at least one instance slot.
crates/ty_python_semantic/src/types/class/slots.rs:255
↓ 1 callersMethodhas_nonlocal_binding
(&self, _name: &str)
crates/ruff_python_parser/tests/fixtures.rs:652
↓ 1 callersFunctionhas_odd_consecutive_backslashes
(mut itr: impl Iterator<Item = u8>)
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/implicit.rs:265
↓ 1 callersMethodhas_one_element
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1536
↓ 1 callersMethodhas_only_constructor_items
Return whether every callable uses ordinary constructor binding semantics.
crates/ty_python_semantic/src/types/call/bind.rs:1066
↓ 1 callersMethodhas_only_finite_members
Returns whether structural comparison can avoid recursive member expansion.
crates/ty_python_semantic/src/types/protocol_class.rs:499
↓ 1 callersMethodhas_only_methods
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/protocol_class.rs:494
↓ 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:922
↓ 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:237
↓ 1 callersMethodhas_pending_initializations
Returns whether any script's initial environment is unavailable. Like [`Self::is_initialization_pending`], this only covers requested synchronization
crates/ty_project/src/uv/environments.rs:203
↓ 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:2028
↓ 1 callersFunctionhas_reviewer
(pull: dict)
scripts/pull_request_reviewers.py:120
↓ 1 callersMethodhas_rules_for
(&self, source: LintSource)
crates/ruff_linter/src/checkers/ast/mod.rs:3733
↓ 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:7232
↓ 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 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:248
↓ 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:3452
↓ 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:945
↓ 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:2439
↓ 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:379
↓ 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:40
↓ 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:58
↓ 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:637
← previousnext →10,001–10,100 of 31,562, ranked by callers