MCPcopy Create free account

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

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

↓ 1 callersFunctionmatch_arguments
Returns `true` if the given arguments match the expected operands.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:455
↓ 1 callersFunctionmatch_async_exit_stack
Return `true` if the current expression is nested in an `await exit_stack.enter_async_context` call.
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:50
↓ 1 callersFunctionmatch_attribute
( expression: &'a mut Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:105
↓ 1 callersFunctionmatch_builtin_type
Return the [`ExprType`] of an [`Expr]` if it is a builtin type (e.g. `int`, `bool`, `float`, `str`, `bytes`, or `complex`).
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_literal_union.rs:139
↓ 1 callersFunctionmatch_check
Match `if` condition to be `expr in name`, returns a tuple of (`expr`, `name`) on success.
crates/ruff_linter/src/rules/refurb/rules/check_and_remove_from_set.rs:134
↓ 1 callersMethodmatch_comments
(&mut self, current_indent: &str, dedent_range: TextRange)
crates/ruff_linter/src/suppression.rs:962
↓ 1 callersFunctionmatch_comparison
( expression: &'a mut Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:87
↓ 1 callersFunctionmatch_comprehension_target
Extract the target from the comprehension (e.g., `(x, y, z)` in `(x, y, z, ...) in iter`).
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:363
↓ 1 callersFunctionmatch_consecutive_appends
Match consecutive calls to `append` on list variables starting from the given statement.
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:168
↓ 1 callersFunctionmatch_consecutive_assignments
Match consecutive assignment statements. Also see the `repeated_append` rule for a similar use case.
crates/ruff_linter/src/rules/pylint/rules/swap_with_temporary_variable.rs:113
↓ 1 callersFunctionmatch_dict
(expression: &'a mut Expression<'b>)
crates/ruff_linter/src/cst/matchers.rs:97
↓ 1 callersMethodmatch_directory
Returns `true` if the path to a directory is definitely excluded and `false` otherwise.
crates/ty_project/src/glob/exclude.rs:33
↓ 1 callersMethodmatch_directory
Check whether a directory or any of its children can be matched by any of the globs. This never returns `false` if any child matches, but it may retu
crates/ty_project/src/glob/include.rs:95
↓ 1 callersMethodmatch_directory_impl
(&self, path: &SystemPath)
crates/ty_project/src/glob/include.rs:99
↓ 1 callersFunctionmatch_docstring_end
Find the end of the docstring (first string statement).
crates/ruff_python_importer/src/insertion.rs:360
↓ 1 callersFunctionmatch_else_return
If a `Stmt::For` contains an `else` with a single boolean `return`, return the [`Terminal`] representing that `return`. For example, matches the `ret
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:307
↓ 1 callersFunctionmatch_encoded_variable
(func: &Expr)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:71
↓ 1 callersFunctionmatch_encoding_arg
Return the encoding argument to an `encode` call, if it can be determined to be a UTF-8-equivalent encoding.
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:106
↓ 1 callersFunctionmatch_eq_target
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:469
↓ 1 callersFunctionmatch_exit_stack
Return `true` if the current expression is nested in an `exit_stack.enter_context` call.
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:92
↓ 1 callersFunctionmatch_extraneous_parentheses
See: https://github.com/asottile/pyupgrade/blob/97ed6fb3cf2e650d4f762ba231c3f04c41797710/pyupgrade/_main.py#L148
crates/ruff_linter/src/rules/pyupgrade/rules/extraneous_parentheses.rs:44
↓ 1 callersFunctionmatch_fields_and_keywords
Match the fields and class keywords from a `TypedDict` call.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:262
↓ 1 callersFunctionmatch_file
()
crates/ty_project/src/glob/include.rs:410
↓ 1 callersFunctionmatch_formatted_string
( expression: &'a mut Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:157
↓ 1 callersFunctionmatch_formatted_string_expression
( formatted_string_content: &'a mut FormattedStringContent<'b>, )
crates/ruff_linter/src/cst/matchers.rs:167
↓ 1 callersFunctionmatch_full_slice
Match `del expr[:]` where `expr` is a list.
crates/ruff_linter/src/rules/refurb/rules/delete_full_slice.rs:81
↓ 1 callersFunctionmatch_generator_exp
( expression: &'a Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:123
↓ 1 callersFunctionmatch_if
(statement: &'a mut Statement<'b>)
crates/ruff_linter/src/cst/matchers.rs:215
↓ 1 callersFunctionmatch_import
( statement: &'a mut Statement<'b>, )
crates/ruff_linter/src/cst/matchers.rs:25
↓ 1 callersFunctionmatch_index_increment
If the statement is an index increment statement (e.g., `i += 1`), return the name of the index variable.
crates/ruff_linter/src/rules/flake8_simplify/rules/enumerate_for_loop.rs:172
↓ 1 callersFunctionmatch_iteration_target
Return the [`IterationTarget`] of an expression, if the expression can be sliced into (i.e., is a list comprehension, or call to `list` or `tuple`).
crates/ruff_linter/src/rules/ruff/rules/unnecessary_iterable_allocation_for_first_element.rs:161
↓ 1 callersMethodmatch_keyword_variadic
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, argument_index: u
crates/ty_python_semantic/src/types/call/bind.rs:5424
↓ 1 callersFunctionmatch_lambda
(expression: &'a Expression<'b>)
crates/ruff_linter/src/cst/matchers.rs:149
↓ 1 callersMethodmatch_line
Check a slice of [`Diagnostic`]s against a slice of [`UnparsedAssertion`]s. Return vector of [`Unmatched`] for any unmatched diagnostics or assertion
crates/mdtest/src/matcher.rs:335
↓ 1 callersFunctionmatch_list_comp
(expression: &'a Expression<'b>)
crates/ruff_linter/src/cst/matchers.rs:141
↓ 1 callersFunctionmatch_list_full_slice
Matches `obj[:]` where `obj` is a list.
crates/ruff_linter/src/rules/refurb/rules/slice_copy.rs:86
↓ 1 callersFunctionmatch_literal_type
Return the [`ExprType`] of an [`Expr`] if it is a literal (e.g., an `int`, like `1`, or a `bool`, like `True`).
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_literal_union.rs:154
↓ 1 callersFunctionmatch_loop
(stmt: &Stmt)
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:250
↓ 1 callersFunctionmatch_model_import
(name: &str, expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:109
↓ 1 callersFunctionmatch_module
(module_text: &str)
crates/ruff_linter/src/cst/matchers.rs:11
↓ 1 callersFunctionmatch_mutation
Check if a statement is (probably) a modification to the list assigned to the given identifier. For example, `foo.append(bar)` would return `true` if
crates/ruff_linter/src/rules/perflint/rules/unnecessary_list_cast.rs:189
↓ 1 callersFunctionmatch_named_tuple_assign
Return the typename, args, keywords, and base class.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:141
↓ 1 callersFunctionmatch_not_implemented
(expr: &Expr)
crates/ruff_linter/src/rules/pyflakes/rules/raise_not_implemented.rs:55
↓ 1 callersFunctionmatch_open_args
Match positional arguments. Return expression for the file name and open mode.
crates/ruff_linter/src/rules/refurb/helpers.rs:352
↓ 1 callersMethodmatch_quality
(&self, name: &str)
crates/ty_ide/src/completion.rs:1635
↓ 1 callersFunctionmatch_read_call
Match `x.read()` expression and return expression `x` on success.
crates/ruff_linter/src/rules/refurb/rules/read_whole_file.rs:156
↓ 1 callersFunctionmatch_remove
Match `if` body to be `name.remove(expr)`, returns a tuple of (`expr`, `name`) on success.
crates/ruff_linter/src/rules/refurb/rules/check_and_remove_from_set.rs:143
↓ 1 callersFunctionmatch_reveal_type_diagnostic
( expected_reveal_type: Option<&str>, expected_reveal_type_message: Option<&str>, unmatched: &mut
crates/mdtest/src/matcher.rs:458
↓ 1 callersFunctionmatch_sibling_return
If a `Stmt::For` is followed by a boolean `return`, return the [`Terminal`] representing that `return`. For example, matches the `return` in: ```pyth
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:347
↓ 1 callersFunctionmatch_simple_comprehension
Returns the [`Expr`] target for a comprehension, if the comprehension is "simple" (e.g., `x` for `[i for i in x]`).
crates/ruff_linter/src/rules/ruff/rules/unnecessary_iterable_allocation_for_first_element.rs:265
↓ 1 callersFunctionmatch_slice_info
Return the argument name, lower bound, and upper bound for an expression, if it's a slice.
crates/ruff_linter/src/rules/ruff/rules/zip_instead_of_pairwise.rs:68
↓ 1 callersFunctionmatch_sources
Returns the source path with respect to which the module `name` should be considered first party, or `None` if no path is found. # Examples - The mo
crates/ruff_linter/src/rules/isort/categorize.rs:170
↓ 1 callersFunctionmatch_target
Given a target and value, find the value that's assigned to the given symbol.
crates/ruff_python_semantic/src/analyze/typing.rs:1311
↓ 1 callersFunctionmatch_to_datetime
Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`. Raises ValueError if the match does not correspond to a valid date o
crates/ruff_benchmark/resources/tomllib/_re.py:52
↓ 1 callersFunctionmatch_to_localtime
(match: re.Match)
crates/ruff_benchmark/resources/tomllib/_re.py:98
↓ 1 callersFunctionmatch_to_number
(match: re.Match, parse_float: ParseFloat)
crates/ruff_benchmark/resources/tomllib/_re.py:104
↓ 1 callersFunctionmatch_token_after
Return the [`TextRange`] of the token after the next match of the predicate, skipping over any bracketed expressions.
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:92
↓ 1 callersFunctionmatch_token_before
Return the [`TextRange`] of the token before the next match of the predicate
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:78
↓ 1 callersFunctionmatch_token_or_closing_brace
Return the [`TextRange`] of the token matching the predicate or the first mismatched bracket, skipping over any bracketed expressions.
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:124
↓ 1 callersFunctionmatch_typed_dict_assign
Return the class name, arguments, keywords and base class for a `TypedDict` assignment.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:126
↓ 1 callersMethodmatch_typed_dict_openness
Match the possible arbitrary keyword arguments represented by a `TypedDict`'s openness. Explicit extra items can constrain named parameters without s
crates/ty_python_semantic/src/types/call/bind.rs:5489
↓ 1 callersFunctionmatch_unittest_context_methods
Return `true` if the current expression is nested in a call to one of the unittest context manager methods: `cls.enterClassContext()`, `self.enterCont
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:127
↓ 1 callersMethodmatch_unpacked_variadic
Checks the positional requirements encoded inside an unpacked variadic annotation. Unlike ordinary `*args`, an unpacked tuple can require arguments a
crates/ty_python_semantic/src/types/call/bind.rs:5554
↓ 1 callersMethodmatch_variadic
Match a variadic argument to the remaining positional, standard or variadic parameters.
crates/ty_python_semantic/src/types/call/bind.rs:5277
↓ 1 callersFunctionmatch_with
(statement: &'a mut Statement<'b>)
crates/ruff_linter/src/cst/matchers.rs:203
↓ 1 callersFunctionmatch_write_call
Match `x.write(foo)` expression and return expression `x` and `foo` on success.
crates/ruff_linter/src/rules/refurb/rules/write_whole_file.rs:170
↓ 1 callersMethodmatched_class_pattern_subject_type
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2764
↓ 1 callersMethodmatched_class_pattern_subject_type_for_context
( &mut self, kind: &'pattern ClassPatternPredicateKind<'db>, context: &ClassPatternCon
crates/ty_python_semantic/src/types/narrow.rs:2780
↓ 1 callersMethodmatched_mapping_pattern_subject_type
( &mut self, kind: &'pattern MappingPatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2978
↓ 1 callersMethodmatched_or_pattern_subject_type
( &mut self, patterns: &'pattern [PatternPredicateKind<'db>], subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:2373
↓ 1 callersMethodmatched_sequence_pattern_subject_type
( &mut self, kind: &'pattern SequencePatternPredicateKind<'db>, subject_ty: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:3059
↓ 1 callersMethodmatches
Check if `assertion` matches any [`Diagnostic`]s in `unmatched`. If so, return `Some` and remove the matched diagnostics from `unmatched`. Otherwise,
crates/mdtest/src/matcher.rs:401
↓ 1 callersMethodmatches
(&self, tested_id: LintId)
crates/ty_python_semantic/src/suppression.rs:530
↓ 1 callersMethodmatches
Whether the comment "matches" another comment, based on indentation and suppressed codes. Expects a "forward search" for matches, ie, will only match
crates/ruff_linter/src/suppression.rs:109
↓ 1 callersFunctionmatches_comment
(comment: dict, pull_request: int, marker: str)
scripts/publish_pr_report.py:97
↓ 1 callersFunctionmatches_constant
(constant: f64, value: f64)
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:91
↓ 1 callersMethodmatches_file
Returns whether this override applies to the given file path.
crates/ty_project/src/metadata/settings.rs:120
↓ 1 callersFunctionmatches_ignoring_indentation
Compares two strings, returning true if they are equal modulo whitespace at the start of each line.
crates/ruff_linter/src/rules/isort/rules/organize_imports.rs:109
↓ 1 callersMethodmatches_source_task
(&self, task_source: &TaskSource)
crates/ty_completion_eval/src/main.rs:112
↓ 1 callersMethodmatches_task
(&self, task: &Task)
crates/ty_completion_eval/src/main.rs:116
↓ 1 callersMethodmatches_tuple_length
(self, actual: TupleLength, expected: i64)
crates/ty_python_semantic/src/types/narrow.rs:1667
↓ 1 callersMethodmatches_value
( &self, literal_expr: LiteralExpressionRef<'_>, unary_op: Option<&UnaryOp>, )
crates/ruff_linter/src/rules/pylint/settings.rs:22
↓ 1 callersMethodmatching
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, preserve_union_altern
crates/ty_python_semantic/src/types/call/arguments.rs:239
↓ 1 callersMethodmatching_overload_index
Returns the index of the matching overload in the form of [`MatchingOverloadIndex`].
crates/ty_python_semantic/src/types/call/bind.rs:4600
↓ 1 callersMethodmatching_partial_overload_index
Returns the matching overload indexes when `functools.partial(...)` ignores errors that are only relevant at invocation time.
crates/ty_python_semantic/src/types/call/bind.rs:3754
↓ 1 callersFunctionmatching_pools
(pools: list[Pool], files: list[str])
scripts/pull_request_reviewers.py:73
↓ 1 callersFunctionmatching_task_decorator
Return the matched `@task` (or supported `@task.<variant>`) decorator on `function_def`, or `None` if there is none.
crates/ruff_linter/src/rules/airflow/rules/task_implicit_multiple_outputs.rs:115
↓ 1 callersMethodmaterialization_changes_requirements
Returns whether a materialization changes any member required by `target`. An unrelated changed member must not prevent an explicitly inherited proto
crates/ty_python_semantic/src/types/instance.rs:1804
↓ 1 callersMethodmaterialize_constrained_type_argument
Materializes a constrained covariant or contravariant argument for a relation check. A constrained type variable can only take one of its declared al
crates/ty_python_semantic/src/types/generics.rs:1853
↓ 1 callersMethodmaterialize_impl
( self, db: &'db dyn Db, materialization_kind: MaterializationKind, visitor: &
crates/ty_python_semantic/src/types/typevar.rs:429
↓ 1 callersMethodmaterialize_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:1488
↓ 1 callersMethodmaterialized_interface_member
Returns an effective materialized member without applying the nominal class fallback.
crates/ty_python_semantic/src/types/instance.rs:1954
↓ 1 callersMethodmaterialized_origin_property
Returns the nominal origin when a materialized requirement is a property descriptor. Descriptor lookup needs the original property object even though
crates/ty_python_semantic/src/types/instance.rs:1791
↓ 1 callersMethodmaterialized_types
The exposed types affected by materialization. Descriptor identity and write presence are fixed by the declaration, so they need not be resolved to co
crates/ty_python_semantic/src/types/protocol_class.rs:1547
↓ 1 callersFunctionmaterialized_unfold
(db: &'db dyn Db, recursive: RecursiveType<'db>)
crates/ty_python_semantic/src/types/recursive.rs:880
↓ 1 callersMethodmaterialized_value_type
( self, db: &'db dyn Db, materialization_kind: MaterializationKind, )
crates/ty_python_semantic/src/types/type_alias.rs:665
↓ 1 callersFunctionmath_constant
FURB152
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:58
↓ 1 callersFunctionmax_constructor_and_typevar_depth
Returns the maximum constructor depth of `ty` and the maximum nesting depth of any typevar that it contains. Atomic types and bare typevars have cons
crates/ty_python_semantic/src/types/constraints.rs:2093
↓ 1 callersFunctionmax_constructor_and_typevar_depth_impl
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, _dummy: (),
crates/ty_python_semantic/src/types/constraints.rs:2098
↓ 1 callersFunctionmax_iterations
()
crates/ruff_linter/src/test.rs:238
← previousnext →11,501–11,600 of 31,562, ranked by callers