MCPcopy Create free account

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

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

↓ 1 callersMethodcommon_literal_supertype
Returns a shared fully static supertype for a union of literal-value types. The returned type is broader than the literal types themselves. For examp
crates/ty_python_semantic/src/types/set_theoretic.rs:529
↓ 1 callersMethodcommon_typed_dict_protocol_constraints
Returns common protocol constraints for the `TypedDict` members of a union when every such member has the same constraints as their shared `Mapping[st
crates/ty_python_semantic/src/types/generics.rs:3749
↓ 1 callersFunctioncommonprefix
(paths)
crates/ruff_linter/resources/test/fixtures/ruff/RUF071.py:19
↓ 1 callersFunctioncompare
(left: &Expr, cmp_op: CmpOp, right: &Expr)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:173
↓ 1 callersFunctioncompare_literal_to_other
Compare a literal with a non-literal type using their known runtime comparison semantics. A literal on the non-target side can constrain the target o
crates/ty_python_semantic/src/types/equality.rs:1634
↓ 1 callersFunctioncompare_nominal_instances
Compare nominal instances when their inherited comparison implementations are known. The result is definite only when the implementations cannot comp
crates/ty_python_semantic/src/types/equality.rs:1764
↓ 1 callersFunctioncompare_to_empty_string
PLC1901
crates/ruff_linter/src/rules/pylint/rules/compare_to_empty_string.rs:62
↓ 1 callersFunctioncompare_to_hardcoded_password_string
S105
crates/ruff_linter/src/rules/flake8_bandit/rules/hardcoded_password_string.rs:76
↓ 1 callersFunctioncompare_with_tuple
SIM109
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:482
↓ 1 callersFunctioncomparison_of_constant
PLR0133
crates/ruff_linter/src/rules/pylint/rules/comparison_of_constant.rs:54
↓ 1 callersMethodcomparison_truthiness
(&self)
crates/ty_python_semantic/src/types/infer.rs:1596
↓ 1 callersFunctioncomparison_with_itself
PLR0124
crates/ruff_linter/src/rules/pylint/rules/comparison_with_itself.rs:50
↓ 1 callersMethodcomplete
Marks the request as completed. Returns the time when the request was registered and the request method name, or `None` if the request was not pendin
crates/ty_server/src/session/request_queue.rs:106
↓ 1 callersMethodcomplete
Marks the request as completed. Returns the time when the request was registered and the request method name, or `None` if the request was not pendin
crates/ruff_server/src/session/request_queue.rs:101
↓ 1 callersMethodcomplete_registration
( &mut self, response: &lsp_server::Response, )
crates/ty_server/src/session/file_watcher.rs:260
↓ 1 callersMethodcompleted
Called after the final synchronization result is handled, including errors. Requests that are rescheduled keep their reporter without completing it.
crates/ty_project/src/lib.rs:175
↓ 1 callersFunctioncompletion_kind_from_type
Returns the "kind" of a completion using just its type information. This is meant to be a very general classification of this completion. Typically,
crates/ty_ide/src/completion.rs:3314
↓ 1 callersMethodcompletions
(&self)
crates/ty_server/src/session/settings.rs:71
↓ 1 callersMethodcompletions
Return completions for this task.
crates/ty_completion_eval/src/main.rs:320
↓ 1 callersMethodcompletions
( &self, file_id: &FileHandle, position: Position, )
crates/ty_wasm/src/lib.rs:522
↓ 1 callersFunctioncomplex_assignment_in_stub
PYI017
crates/ruff_linter/src/rules/flake8_pyi/rules/complex_assignment_in_stub.rs:57
↓ 1 callersFunctioncomplex_if_statement_in_stub
PYI002
crates/ruff_linter/src/rules/flake8_pyi/rules/complex_if_statement_in_stub.rs:48
↓ 1 callersFunctioncomplex_raises
PT012
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:232
↓ 1 callersFunctioncomplex_warns
PT031
crates/ruff_linter/src/rules/flake8_pytest_style/rules/warns.rs:201
↓ 1 callersFunctioncomplicated_calc
(*arg, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM114.py:78
↓ 1 callersMethodcomponents_excluding_self
Returns the components of the qualified name of this type alias, excluding the alias itself. For example, calling this method on a type alias `D` ins
crates/ty_python_semantic/src/types/type_alias.rs:1014
↓ 1 callersFunctioncomposite_condition
PT018
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:843
↓ 1 callersFunctioncompound_statements
E701, E702, E703
crates/ruff_linter/src/rules/pycodestyle/rules/compound_statements.rs:105
↓ 1 callersFunctioncomprehension
Run lint rules over a [`Comprehension`] syntax nodes.
crates/ruff_linter/src/checkers/ast/analyze/comprehension.rs:8
↓ 1 callersMethodcomprehension_binding_status
Summarizes whether the comprehension's live exit paths bind `name`. For example, `value` is only possibly bound after this comprehension because the
crates/ty_python_core/src/builder.rs:2057
↓ 1 callersMethodcomprehension_element_type
( &self, element: &ast::Expr, inference: &ScopeInference<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:8712
↓ 1 callersFunctioncomprehension_named_expression_is_local
Returns whether a comprehension walrus belongs to an enclosing function or lambda. ```python def last_item(items): [(last := item) for item in items]
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:57
↓ 1 callersMethodcompute
(&mut self, max_line_len: usize)
crates/ruff_annotate_snippets/src/renderer/margin.rs:61
↓ 1 callersMethodcompute_source_location
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:32
↓ 1 callersMethodconcatenate
Create a parameter list representing a `Concatenate` form with the given prefix parameters and the tail (either gradual or a `ParamSpec`). Internally
crates/ty_python_semantic/src/types/signatures.rs:5381
↓ 1 callersFunctionconcatenate_expressions
Recursively merge all the tuples and lists in the expression.
crates/ruff_linter/src/rules/ruff/rules/collection_literal_concatenation.rs:101
↓ 1 callersFunctionconcatenate_strings
Concatenates two strings The `a_string_range` and `b_string_range` are the range of the entire string, not just of the string token itself (important
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/implicit.rs:186
↓ 1 callersFunctionconcatenated_f_string
Concatenates the contents of an f-string, without the prefix and quotes, and escapes any special characters. ## Example ```python "foo" f"bar {x}" "
crates/ruff_linter/src/rules/flake8_bandit/rules/hardcoded_sql_expression.rs:133
↓ 1 callersFunctionconda_prefix_has_python
(path: &SystemPath, system: &dyn System)
crates/ty_site_packages/src/lib.rs:1064
↓ 1 callersMethodcondensable_literals
Return the literal types that can be folded into a displayed `Literal[...]` group. Plain literal types are returned as-is. Small enum complements are
crates/ty_python_semantic/src/types/display.rs:3154
↓ 1 callersFunctioncondition_as_expression_statement
Return the `if` condition in a form that remains a single valid expression statement.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_if.rs:128
↓ 1 callersFunctionconfig
(key: Option<&str>, format: HelpFormat)
crates/ruff/src/commands/config.rs:9
↓ 1 callersMethodconfig
Returns the path to the tool's configuration file with the configuration content or `None` if the tool requires no configuration file.
scripts/ty_benchmark/src/benchmark/tool.py:52
↓ 1 callersMethodconfig
(self, project: Project, venv: Venv)
scripts/ty_benchmark/src/benchmark/tool.py:100
↓ 1 callersMethodconfig_file
(&self)
crates/ruff/src/args.rs:719
↓ 1 callersMethodconfiguration_file
(&self)
crates/ty_server/src/session/settings.rs:55
↓ 1 callersMethodconfigure_lsp
(self, project: Project, venv: Venv)
scripts/ty_benchmark/src/benchmark/tool.py:62
↓ 1 callersMethodconfigured_python_path
Returns the configured environment or interpreter path, without resolving the full merged options.
crates/ty_project/src/metadata.rs:509
↓ 1 callersFunctionconflicting_import_settings
Detect conflicts between I002 (missing-required-import) and ICN001 (unconventional-import-alias)
crates/ruff_workspace/src/configuration.rs:1691
↓ 1 callersFunctionconflicting_lazy_import_settings
( require_lazy: &ImportSelector, ban_lazy: &ImportSelector, )
crates/ruff_workspace/src/options.rs:2277
↓ 1 callersFunctionconflicting_named_tuple_field
Returns the first inherited `NamedTuple` field in the MRO for `field_name`.
crates/ty_python_semantic/src/types/overrides.rs:687
↓ 1 callersFunctionconflicting_required_import_pyi025
Detect conflicts between I002 (missing-required-import) and PYI025 (unaliased-collections-abc-set-import). If `required-imports` includes `from colle
crates/ruff_workspace/src/configuration.rs:1735
↓ 1 callersFunctionconfusable
This file is auto-generated by `scripts/update_ambiguous_characters.py`. Via: <https://github.com/hediet/vscode-unicode-data/blob/main/out/ambiguous.j
crates/ruff_linter/src/rules/ruff/rules/confusables.rs:5
↓ 1 callersFunctionconnect
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF059_0.py:63
↓ 1 callersFunctionconnect
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F841_0.py:63
↓ 1 callersFunctionconservative_pattern_binding_fallthrough_type
Compute binding fallthrough without expanding exact tuples. This preserves the recursive handling of `Or` and `As` patterns while providing the fallb
crates/ty_python_semantic/src/types/match_pattern.rs:1076
↓ 1 callersFunctionconstant_factory
(value)
crates/ruff_linter/resources/test/fixtures/ruff/RUF026.py:117
↓ 1 callersFunctionconstant_imported_as_non_constant
N811
crates/ruff_linter/src/rules/pep8_naming/rules/constant_imported_as_non_constant.rs:68
↓ 1 callersMethodconstraining_collection_uses
Returns all potentially constraining uses of the given unannotated collection initializer.
crates/ty_python_core/src/lib.rs:604
↓ 1 callersMethodconstraint_between
Combines the constraints after `ancestor` through `target` into a single constraint. `ancestor` must be an ancestor of `target`.
crates/ty_python_core/src/use_def.rs:1932
↓ 1 callersMethodconstraint_failure_evidence
Finds evidence that excludes every declared constraint without relying on both sides of the inferred range together. A conflict between otherwise vali
crates/ty_python_semantic/src/types/constraints/solutions.rs:963
↓ 1 callersMethodconstraint_keys
Returns the keys identifying narrowing constraints applicable to the resolved place.
crates/ty_python_semantic/src/place_load.rs:244
↓ 1 callersFunctionconstructor_fields_are_keyword_only
Return `true` if fields in `class` are keyword-only constructor parameters. Pydantic model fields are generally keyword-only, but a root model's `roo
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:714
↓ 1 callersFunctionconstructor_fields_are_optional
Return `true` if fields are optional constructor parameters for `class`. A settings model can populate any field from environment variables or anothe
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:733
↓ 1 callersFunctionconstructor_parameter_type
Return the input type accepted by a Pydantic field's synthesized constructor parameter.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1028
↓ 1 callersFunctionconstructor_signature
(model: &SemanticModel, call_expr: &ast::ExprCall)
crates/ty_python_semantic/src/types/ide_support.rs:2163
↓ 1 callersFunctionconsume_all_progress_notifications
(server: &mut TestServer)
crates/ty_server/tests/e2e/pull_diagnostics.rs:928
↓ 1 callersMethodconsume_ascii_character
Dispatch based on the given character.
crates/ruff_python_parser/src/lexer.rs:398
↓ 1 callersMethodconsume_end
(&mut self)
crates/ruff_python_parser/src/lexer.rs:1136
↓ 1 callersFunctionconsume_length
(iter: &mut ParseIter<I>)
crates/ruff_python_literal/src/cformat.rs:203
↓ 1 callersMethodconsume_line
Consumes a line if it is inside a reST literal block already observed by `observe_marker`.
crates/ty_ide/src/docstring/document/preformatted.rs:155
↓ 1 callersFunctionconsume_rest_prefix_role
Consumes the prefix-role pattern recognized by the field parser, leaving the cursor unchanged otherwise. For example, this consumes the entire input:
crates/ty_ide/src/docstring/document/google.rs:856
↓ 1 callersMethodconsume_until
(&mut self, mut end_predicate: impl FnMut(char) -> bool)
crates/mdtest/src/parser.rs:578
↓ 1 callersFunctioncontainment_behavior
Return the containment behavior known for this type.
crates/ty_python_semantic/src/types/narrow/containment.rs:16
↓ 1 callersMethodcontains
Returns `true` if the index contains `range`.
crates/ruff_python_trivia/src/comment_ranges.rs:61
↓ 1 callersMethodcontains_any
Check if the [`TypingTarget`] explicitly allows `Any`.
crates/ruff_linter/src/rules/ruff/typing.rs:209
↓ 1 callersFunctioncontains_await
Return `true` if the [`Expr`] contains an `await` expression.
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs:183
↓ 1 callersFunctioncontains_blind_exception
( semantic: &'a SemanticModel, expr: &'a Expr, )
crates/ruff_linter/src/rules/flake8_blind_except/rules/blind_except.rs:84
↓ 1 callersMethodcontains_constraint
(&self, constraint: AtomicConstraintId)
crates/ty_python_semantic/src/types/constraints/paths.rs:603
↓ 1 callersFunctioncontains_exception_group
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_async/rules/pytest_raises_exception_group.rs:116
↓ 1 callersFunctioncontains_growing_type
Whether inspecting `ty` can encounter recursive types with changing specializations. Exact recursive types are safe to inspect once. For protocol met
crates/ty_python_semantic/src/types/visitor.rs:866
↓ 1 callersFunctioncontains_invalid_string_character
Helper that allows us to exit early before embarking on expensive walks of all tokens for various pylint rules. Interpolation depth matters for fixes
crates/ruff_linter/src/rules/pylint/rules/invalid_string_characters.rs:195
↓ 1 callersFunctioncontains_message
Returns `true` if an expression appears to be an exception message (i.e., a string with some whitespace).
crates/ruff_linter/src/rules/tryceratops/rules/raise_vanilla_args.rs:89
↓ 1 callersMethodcontains_more_than
Returns whether this support contains any typevars that are not in `other`.
crates/ty_python_semantic/src/types/constraints/support.rs:101
↓ 1 callersMethodcontains_name_with_prefix
Returns whether any entry name starts with `prefix`.
crates/ruff_db/src/files/directory.rs:24
↓ 1 callersMethodcontains_never
(&self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:2062
↓ 1 callersMethodcontains_none
Check if the [`TypingTarget`] explicitly allows `None`.
crates/ruff_linter/src/rules/ruff/typing.rs:165
↓ 1 callersMethodcontains_place
Returns whether any predicate may narrow `place`.
crates/ty_python_core/src/use_def.rs:674
↓ 1 callersMethodcontains_quote
(&self, range: TextRange, flags: AnyStringFlags)
crates/ruff_python_formatter/src/string/normalize.rs:997
↓ 1 callersFunctioncontains_quotes
Return `true` if the string contains quotes.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:130
↓ 1 callersFunctioncontains_side_effecting_sub_expression
(target: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_dict_comprehension_for_iterable.rs:233
↓ 1 callersMethodcontains_type_form_value
(&self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/type_form.rs:73
↓ 1 callersFunctioncontains_unescaped_newline
(haystack: &str)
crates/ruff_python_formatter/src/string/docstring.rs:217
↓ 1 callersFunctioncontains_yield_like
Return `true` if the [`Expr`] contains an `await`, `yield`, or `yield from` expression.
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:421
↓ 1 callersFunctioncontentHash
(content: string)
playground/shared/src/downloadZip.ts:34
↓ 1 callersMethodcontext
Returns the Context specifying how to format the current CST
crates/ruff_formatter/src/formatter.rs:37
↓ 1 callersFunctioncontext_manager_iterator
UP052
crates/ruff_linter/src/rules/pyupgrade/rules/context_manager_iterator.rs:90
↓ 1 callersFunctioncontinue_in_finally
PLE0116
crates/ruff_linter/src/rules/pylint/rules/continue_in_finally.rs:89
↓ 1 callersMethodconvention
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:98
↓ 1 callersFunctionconvert_call_to_conversion_flag
Generate a [`Fix`] to replace an explicit type conversion with a conversion flag.
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:138
← previousnext →8,601–8,700 of 31,766, ranked by callers