MCPcopy Create free account

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

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

↓ 1 callersFunctionis_whitespace_needed
(kind: TokenKind)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/missing_whitespace_around_operator.rs:360
↓ 1 callersMethodis_wildcard
Checks if the [`Pattern`] is a [wildcard pattern]. The following are wildcard patterns: ```python match subject: case _ as x: ... case _ | _: ... cas
crates/ruff_python_ast/src/nodes.rs:3113
↓ 1 callersFunctionis_wildcard_command
Return `true` if the [`Expr`] is a wildcard command. ## Examples ```python import subprocess subprocess.Popen("/bin/chown root: *", shell=True) subp
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:574
↓ 1 callersMethodis_wildcard_import
Returns `true` if the unresolved reference may be resolved by a wildcard import.
crates/ruff_python_semantic/src/reference.rs:188
↓ 1 callersFunctionis_wildcard_pattern
Returns true if the [`Pattern`] is a wildcard pattern.
crates/ruff_python_semantic/src/analyze/terminal.rs:372
↓ 1 callersMethodis_yes
(self)
crates/ty_python_semantic/src/types/display.rs:2492
↓ 1 callersMethodis_yield_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2096
↓ 1 callersMethodis_yield_expression_allowed
Returns `true` if yield expressions are allowed.
crates/ruff_python_parser/src/parser/expression.rs:3225
↓ 1 callersMethodis_yield_from
(&self)
crates/ruff_python_formatter/src/expression/expr_yield.rs:18
↓ 1 callersFunctionis_zero
Check that the slice [`Expr`] is a slice of the first element (e.g., `x[0]`).
crates/ruff_linter/src/rules/ruff/rules/unnecessary_iterable_allocation_for_first_element.rs:134
↓ 1 callersFunctionis_zero_offset_timezone
(value: &str)
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:278
↓ 1 callersFunctionisinstance_target
If `call` is an `isinstance()` call, return its target.
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:316
↓ 1 callersFunctionisinstance_type_none
FURB168
crates/ruff_linter/src/rules/refurb/rules/isinstance_type_none.rs:54
↓ 1 callersMethodisolation
Return the [`IsolationLevel`] of the [`Fix`].
crates/ruff_diagnostics/src/fix.rs:163
↓ 1 callersMethodisolation
Returns the [`IsolationLevel`] to isolate fixes for a given node. The primary use-case for fix isolation is to ensure that we don't delete all statem
crates/ruff_linter/src/checkers/ast/mod.rs:587
↓ 1 callersFunctionitem_total_bytes
Get total bytes (metadata + fields) for a struct or query item.
scripts/memory_report.py:153
↓ 1 callersFunctionitem_uri
(item: &WorkspaceDocumentDiagnosticReport)
crates/ty_server/tests/e2e/pull_diagnostics.rs:1168
↓ 1 callersFunctionitemgetter_op
Return the `operator` implemented by given subscript expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:276
↓ 1 callersFunctionitemgetter_op_tuple
Return the `operator` implemented by given tuple expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:298
↓ 1 callersMethoditems
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:494
↓ 1 callersMethoditer
(&self)
crates/ruff_python_semantic/src/definition.rs:321
↓ 1 callersMethoditer_comments
(&self)
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1195
↓ 1 callersMethoditer_enumerated
( &self, )
crates/ruff_index/src/slice.rs:82
↓ 1 callersFunctioniter_method_return_iterable
PYI045
crates/ruff_linter/src/rules/flake8_pyi/rules/iter_method_return_iterable.rs:91
↓ 1 callersMethoditer_mro_specialized
Iterate over the method resolution order ("MRO") of the class, optionally applying an additional specialization to it if the class is generic.
crates/ty_python_semantic/src/types/class.rs:1404
↓ 1 callersMethoditer_ones
(&self)
crates/ty_python_core/src/rank.rs:83
↓ 1 callersMethoditerable_annotation_ranges
Locate the iterable name and its element annotation so a fix can change only the name. Keeping the rest of the source preserves aliases, forward refer
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:965
↓ 1 callersFunctioniterable_factory_definition
Finds the declaration for a directly called, non-overloaded iterable factory. The iterable has already been inferred as a standalone expression. Reus
crates/ty_python_semantic/src/types/iteration.rs:94
↓ 1 callersFunctionjinja2_autoescape_false
S701
crates/ruff_linter/src/rules/flake8_bandit/rules/jinja2_autoescape_false.rs:62
↓ 1 callersFunctionjob_log
(job: dict[str, Any])
scripts/collect_ty_ecosystem_run_metadata.py:299
↓ 1 callersMethodjoin
(&'c mut self, separator: &'static str)
crates/ty_python_semantic/src/types/display.rs:427
↓ 1 callersFunctionjoin_multiline_string_sequence_items
Join the elements and comments of a multiline string sequence definition into a single string. The resulting string does not include the "prelude" or
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:914
↓ 1 callersMethodjson_schema
(generator: &mut schemars::SchemaGenerator)
crates/ruff_ranged_value/src/lib.rs:160
↓ 1 callersMethodjsonable
(self)
python/ruff-ecosystem/ruff_ecosystem/types.py:70
↓ 1 callersFunctionjump_statement_in_finally
B012
crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs:94
↓ 1 callersFunctionkebab_case
(input: TokenStream)
crates/ruff_macros/src/lib.rs:65
↓ 1 callersMethodkeep_line
(&self, annotated_line_infos: &mut Vec<AnnotatedLineInfo<'a>>, line_index: usize)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:384
↓ 1 callersFunctionkey
(expr: &ruff_python_ast::Expr)
crates/ruff_python_ast_integration_tests/tests/comparable.rs:113
↓ 1 callersMethodkey_from_uri
(&self, uri: Uri)
crates/ruff_server/src/session.rs:99
↓ 1 callersFunctionkey_in_dict_compare
SIM118 in a comparison.
crates/ruff_linter/src/rules/flake8_simplify/rules/key_in_dict.rs:179
↓ 1 callersFunctionkey_in_dict_comprehension
SIM118 in a comprehension.
crates/ruff_linter/src/rules/flake8_simplify/rules/key_in_dict.rs:168
↓ 1 callersFunctionkey_in_dict_for
SIM118 in a `for` loop.
crates/ruff_linter/src/rules/flake8_simplify/rules/key_in_dict.rs:157
↓ 1 callersFunctionkey_membership_contains_protocol
Return a synthesized protocol that records a true key-membership test without implying subscript access. For non-`TypedDict` types, `"key" in value`
crates/ty_python_semantic/src/types/narrow.rs:5639
↓ 1 callersMethodkey_projection
( &self, db: &'db dyn Db, operator: ComparisonOperator, )
crates/ty_python_semantic/src/types/equality/enums.rs:832
↓ 1 callersFunctionkey_value_rule
( src: str, pos: Pos, out: Output, header: Key, parse_float: ParseFloat )
crates/ruff_benchmark/resources/tomllib/_parser.py:323
↓ 1 callersFunctionkeyword_argument_hover_contents
( db: &'db dyn Db, model: &SemanticModel<'db>, goto_target: &GotoTarget<'_>, )
crates/ty_ide/src/hover.rs:252
↓ 1 callersMethodkeyword_default
(&self, parameter_index: usize)
crates/ty_python_semantic/src/types/signatures.rs:948
↓ 1 callersFunctionkeyword_is_literal
(keyword: &Keyword, literal: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:116
↓ 1 callersMethodkind
Returns the [`BlockKind`] of the block at the given index
crates/ruff_python_semantic/src/cfg/graph.rs:61
↓ 1 callersMethodkind
(&self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:36
↓ 1 callersMethodkind
Returns the "kind" of this symbol. The kind of a symbol in the context of auto-import is determined on a best effort basis. It may be imprecise in so
crates/ty_ide/src/all_symbols.rs:160
↓ 1 callersMethodkind_for
( &self, db: &'db dyn Db, variable: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:8328
↓ 1 callersMethodkind_iter
(self)
crates/ruff_python_parser/src/parser/mod.rs:1804
↓ 1 callersMethodkinds
()
crates/ty_wasm/src/lib.rs:1549
↓ 1 callersFunctionknown_constructor_preserves_value_type
Return whether a known standard-library constructor preserves the inferred value type. An inherited `_value_` annotation identifies the constructor's
crates/ty_python_semantic/src/types/enums.rs:479
↓ 1 callersMethodknown_decorators
(&self)
crates/ty_python_semantic/src/types/infer.rs:397
↓ 1 callersMethodknown_equal_type
Return the known subset of `self` that compares equal to `other`'s single key.
crates/ty_python_semantic/src/types/equality/enums.rs:874
↓ 1 callersMethodlabel
(self)
crates/ruff_server/src/server.rs:331
↓ 1 callersMethodlabel
(&self)
crates/ty_ide/src/goto_definition.rs:2876
↓ 1 callersFunctionlambda_assignment
E731
crates/ruff_linter/src/rules/pycodestyle/rules/lambda_assignment.rs:69
↓ 1 callersFunctionlambda_contains_yield
Returns true if the expression tree contains a `yield` or `yield from` expression.
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_map.rs:222
↓ 1 callersFunctionlambda_has_expected_arity
A lambda as the first argument to `map()` has the "expected" arity when: It has exactly one parameter That parameter is not variadic That parameter d
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_map.rs:233
↓ 1 callersFunctionlanguageForFile
(file: FileHandle | string)
playground/ty/src/Playground.tsx:772
↓ 1 callersMethodlast_child_in_clause
Returns the last child in the clause body immediately following this clause header. For most clauses, this is the last statement in the primary body.
crates/ruff_python_formatter/src/statement/clause.rs:49
↓ 1 callersMethodlast_item_index
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:200
↓ 1 callersMethodlast_item_index
(&self)
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_slots.rs:361
↓ 1 callersMethodlast_operand
Returns the last operand (the right most operand).
crates/ruff_python_formatter/src/expression/binary_like.rs:597
↓ 1 callersMethodlast_suite_in_statement
(self)
crates/ruff_python_formatter/src/statement/suite.rs:80
↓ 1 callersFunctionlate_binding
Returns `true` if the lambda defined by the given parameters and body contains any names that are late-bound within nested lambdas. For example, give
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_map.rs:304
↓ 1 callersMethodlater_minimum_positional_count
Returns the minimum number of positional values supplied by the arguments after the argument at `argument_index`. In `f(*args, x, *tail)`, this count
crates/ty_python_semantic/src/types/call/bind.rs:5107
↓ 1 callersFunctionlax_alias
Return a lax-input alias like `LaxInt` from `ty_extensions.pydantic`.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1357
↓ 1 callersFunctionlax_input_type
Return the documented Python input type accepted by Pydantic for `field_type` in lax mode.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1093
↓ 1 callersMethodlazy_base
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:64
↓ 1 callersMethodlazy_bound_unchecked
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:654
↓ 1 callersMethodlazy_constraints_unchecked
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:695
↓ 1 callersMethodlazy_default
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:846
↓ 1 callersMethodlazy_default_unchecked
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:756
↓ 1 callersMethodlazy_import_context
(&self)
crates/ruff_python_parser/tests/fixtures.rs:622
↓ 1 callersFunctionlazy_import_immediately_resolved
TID255 Check whether a name load forces a lazy import during module import execution.
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_immediately_resolved.rs:93
↓ 1 callersFunctionlazy_import_mismatch
TID254
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_mismatch.rs:105
↓ 1 callersFunctionlazy_import_prefix_range
Return the range from `lazy` through the whitespace before `import` or `from`.
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_immediately_resolved.rs:163
↓ 1 callersFunctionleading_chars
Return the leading characters for an expression, if it's a string literal, f-string, or string concatenation.
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs:1059
↓ 1 callersFunctionleading_comments_spacing
Manual spacing for the leading comments of upper and step
crates/ruff_python_formatter/src/expression/expr_slice.rs:261
↓ 1 callersMethodleaf_matches_needle
Text-level prefilter for call-site leaves. Ordinary attribute leaves must spell the queried name; bare-name leaves always resolve semantically because
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:269
↓ 1 callersMethodleave_interior
( &mut self, _db: &'db dyn Db, storage: &mut ConstraintSetStor
crates/ty_python_semantic/src/types/constraints.rs:4671
↓ 1 callersMethodleave_node
(&mut self, node: AnyNodeRef<'ast>)
crates/ruff_python_formatter/src/comments/visitor.rs:114
↓ 1 callersMethodleft
(&self, line_len: usize)
crates/ruff_annotate_snippets/src/renderer/margin.rs:101
↓ 1 callersMethodleft_operator
Returns the index of the operator directly left to this operand. Returns [`None`] if this is the first operand in the call chain.
crates/ruff_python_formatter/src/expression/binary_like.rs:1053
↓ 1 callersFunctionlegacy_generic_class_context
Parse the type arguments to `Generic[...]` or `Protocol[...]` and validate that each argument is a type variable.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:2635
↓ 1 callersFunctionlegacy_raises_warns_deprecated_call
RUF061
crates/ruff_linter/src/rules/ruff/rules/legacy_form_pytest_raises.rs:124
↓ 1 callersFunctionlegacy_random
NPY002
crates/ruff_linter/src/rules/numpy/rules/legacy_random.rs:65
↓ 1 callersFunctionlegacy_type_comment
PYI033
crates/ruff_linter/src/rules/flake8_pyi/rules/legacy_type_comment.rs:46
↓ 1 callersMethodlen
(&self)
crates/ty_project/src/lib.rs:1077
↓ 1 callersMethodlen
(self)
crates/ruff_text_size/src/range.rs:133
↓ 1 callersMethodlen
(&self)
crates/ty_ide/src/lib.rs:260
↓ 1 callersFunctionlen_test
PLC1802
crates/ruff_linter/src/rules/pylint/rules/len_test.rs:84
↓ 1 callersMethodlength_test_against_type_with_known_length
Return `Some((expr, expr_ty, expr_length))`, where `expr_ty` is the type of an object being tested for length, and `expr_length` is its known length.
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:851
↓ 1 callersMethodlevel
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2328
↓ 1 callersMethodlevel_filter
(self)
crates/ty/src/logging.rs:89
↓ 1 callersMethodlevel_filter
(&self)
crates/ruff_linter/src/logging.rs:114
← previousnext →11,201–11,300 of 31,562, ranked by callers