MCPcopy Create free account

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

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

↓ 1 callersMethodfinish
(self)
crates/ruff_python_semantic/src/globals.rs:69
↓ 1 callersMethodfinish
Returns finished control flow graph
crates/ruff_python_semantic/src/cfg/graph.rs:277
↓ 1 callersMethodfinish
(self)
crates/ruff_workspace/src/resolver.rs:574
↓ 1 callersMethodfinish
( self, narrowing_constraints: &mut NarrowingConstraintsBuilder, reachability_constrai
crates/ty_python_core/src/use_def.rs:522
↓ 1 callersMethodfinish
Stores use IDs and their lexical places in node-index order. The IDs themselves keep the order in which the flow builder visited uses in each scope.
crates/ty_python_core/src/ast_ids.rs:112
↓ 1 callersMethodfinish
(self)
crates/ruff_options_metadata/src/lib.rs:351
↓ 1 callersMethodfinish
(self, syntax: Mod)
crates/ruff_python_parser/src/parser/mod.rs:225
↓ 1 callersMethodfinish
(mut self)
crates/mdtest/src/parser.rs:555
↓ 1 callersMethodfinish
Emits the field that was constructed with this builder.
crates/ty_ide/src/docstring/document/rst.rs:295
↓ 1 callersMethodfinish
Finish a comparison, caching its result if the generation is unchanged. When adding a result would exceed the cache limit, discard the completed entr
crates/ty_python_semantic/src/types/equality.rs:490
↓ 1 callersMethodfinish
(&mut self)
crates/ty_python_semantic/src/types/display.rs:524
↓ 1 callersMethodfinish
(self)
crates/ty_python_semantic/src/types/cyclic.rs:577
↓ 1 callersMethodfinish
( mut self, mut storage: ConstraintSetStorage<'_>, root: InteriorNode, mapped_
crates/ty_python_semantic/src/types/constraints/owned.rs:138
↓ 1 callersMethodfinish
(self)
crates/ruff_python_index/src/multiline_ranges.rs:56
↓ 1 callersMethodfinish_annotated_assignment
Bind the value of an annotated assignment whose declaration was recorded before its RHS.
crates/ty_python_core/src/builder.rs:1690
↓ 1 callersMethodfinish_context_manager_context
Removes the innermost context manager and returns the exceptions it could suppress. Removing the context before its exit method runs prevents it from
crates/ty_python_core/src/builder/except_handlers.rs:91
↓ 1 callersMethodfinish_doctest
(&mut self)
crates/ty_ide/src/docstring/markdown/general.rs:347
↓ 1 callersMethodfinish_document
(mut self)
crates/ty_ide/src/docstring/markdown/general.rs:376
↓ 1 callersMethodfinish_enclosing_snapshots
( &mut self, )
crates/ty_python_core/src/builder.rs:837
↓ 1 callersMethodfinish_expression
(mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:12083
↓ 1 callersMethodfinish_function_decorator_inference
(mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:12265
↓ 1 callersMethodfinish_implicit_alias_reference
Infer the value type and optional source definition for an assignment such as `Forwarded = Items` or `Forwarded = module.Items`. The caller uses the d
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:124
↓ 1 callersMethodfinish_leading_prose
(&mut self)
crates/ty_ide/src/docstring/document/numpy.rs:559
↓ 1 callersMethodfinish_markdown_fence
(&mut self, line: &str)
crates/ty_ide/src/docstring/markdown/general.rs:360
↓ 1 callersMethodfinish_non_alias_type_expression_diagnostics
Infer an ordinary assignment's right-hand side as a type expression to explain why its value cannot be used as a type. For example, `Number = type(1)
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:148
↓ 1 callersMethodfinish_pending_captures
( &mut self, popped_scope_id: FileScopeId, popped_scope_laziness: ScopeLaziness,
crates/ty_python_core/src/builder.rs:677
↓ 1 callersMethodfinish_rest_literal
(&mut self)
crates/ty_ide/src/docstring/markdown/general.rs:318
↓ 1 callersMethodfinish_scope
(mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:12561
↓ 1 callersMethodfinish_signature_details
Produce function signature info
crates/ty_python_semantic/src/types/display.rs:360
↓ 1 callersMethodfinish_statement
(mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:12161
↓ 1 callersMethodfinish_type_details
Produce type info
crates/ty_python_semantic/src/types/display.rs:350
↓ 1 callersMethodfinished
Called when uv returns, including when it returns an error.
crates/ty_project/src/lib.rs:171
↓ 1 callersMethodfinished
(&mut self)
crates/ty/src/lib.rs:904
↓ 1 callersMethodfinite_alternatives_for_display
Return the finite alternatives only if they remain concise enough for display.
crates/ty_python_semantic/src/types/set_theoretic.rs:1078
↓ 1 callersFunctionfirst_component
Retrieves the first component of an imported name: `pkg` for `pkg.old`, or `old` for `old`.
crates/ty_ide/src/will_rename.rs:454
↓ 1 callersFunctionfirst_enum_auto_value
Compute the first auto-assigned value for functional enum forms that only specify names. `StrEnum` ignores `start` and uses the lowercased member nam
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:168
↓ 1 callersMethodfirst_local_definition
Returns the first local definition created by `covering_node`, if any. A local definition is a user-visible definition associated with `covering_node
crates/ty_python_semantic/src/semantic_model.rs:523
↓ 1 callersMethodfirst_matching_overload
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:391
↓ 1 callersMethodfirst_method
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/comments9.py:113
↓ 1 callersMethodfirst_operator
Returns the first comparison operator (`<` in `a < b <= c`). # Panics Panics if there are no operators. The parser always produces at least one oper
crates/ruff_python_ast/src/nodes.rs:134
↓ 1 callersMethodfirst_party_roots
Returns the configured roots for first-party modules.
crates/ty_module_resolver/src/resolve.rs:920
↓ 1 callersMethodfirst_reachable_declaration_order
( mut self, db: &'db dyn Db, mut predicate: impl FnMut(DefinitionState<'db>) -> bool,
crates/ty_python_semantic/src/reachability.rs:2329
↓ 1 callersMethodfirst_token
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:209
↓ 1 callersMethodfits_element
(&mut self, element: &'a FormatElement)
crates/ruff_formatter/src/printer/mod.rs:1166
↓ 1 callersFunctionfits_expanded
Changes the definition of *fits* for `content`. It measures the width of all lines and allows the content inside of the [`fits_expanded`] to exceed th
crates/ruff_formatter/src/builders.rs:2224
↓ 1 callersMethodfits_group
( &mut self, kind: TagKind, group_mode: GroupMode, id: Option<GroupId>,
crates/ruff_formatter/src/printer/mod.rs:1457
↓ 1 callersMethodfits_text
(&mut self, text: Text, args: PrintElementArgs)
crates/ruff_formatter/src/printer/mod.rs:1485
↓ 1 callersFunctionfix
()
crates/ty/tests/cli/fixes.rs:168
↓ 1 callersMethodfix_all
(&self)
crates/ruff_server/src/session/settings.rs:143
↓ 1 callersFunctionfix_always_false_branch
Fix a branch that is known to always evaluate to `false`. For example, when running with a minimum supported version of Python 3.8, the following bra
crates/ruff_linter/src/rules/pyupgrade/rules/outdated_version_block.rs:271
↓ 1 callersFunctionfix_always_true_branch
Fix a branch that is known to always evaluate to `true`. For example, when running with a minimum supported version of Python 3.8, the following bran
crates/ruff_linter/src/rules/pyupgrade/rules/outdated_version_block.rs:376
↓ 1 callersFunctionfix_banned_relative_import
( stmt: &Stmt, level: u32, module: Option<&str>, module_path: Option<&[String]>, generator
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/relative_imports.rs:87
↓ 1 callersFunctionfix_by_reexporting
Generate a [`Fix`] to make bindings in a statement explicit, either by adding them to `__all__` or by changing them from `import a` to `import a as a`
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:606
↓ 1 callersFunctionfix_by_removing_imports
Generate a [`Fix`] to remove unused imports from a statement.
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:564
↓ 1 callersFunctionfix_composite_condition
Replace composite condition `assert a == "hello" and b == "world"` with two statements `assert a == "hello"` and `assert b == "world"`.
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:730
↓ 1 callersFunctionfix_creates_docstring
Returns `true` if removing the `+` operator would turn the enclosing expression statement into a docstring, which would change the program's behavior
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/explicit.rs:125
↓ 1 callersFunctionfix_float_literal
( original_range: TextRange, float: Float, locator: &Locator, stylist: &Stylist, )
crates/ruff_linter/src/rules/ruff/rules/decimal_from_float_literal.rs:135
↓ 1 callersFunctionfix_fstring_syntax
(range: TextRange)
crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs:287
↓ 1 callersFunctionfix_imports
Generate a [`Fix`] to defer imports used only for typing.
crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs:615
↓ 1 callersFunctionfix_multiple_with_statements
(SIM117) Convert `with a: with b:` to `with a, b:`.
crates/ruff_linter/src/rules/flake8_simplify/rules/fix_with.rs:16
↓ 1 callersMethodfix_mut
(&mut self)
crates/ruff_db/src/diagnostic/mod.rs:382
↓ 1 callersFunctionfix_starts_with_none_none
Check whether the proposed fix starts with two `None` literals.
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_numeric_union.rs:367
↓ 1 callersMethodfix_title
(&self)
crates/ruff_linter/src/violation.rs:110
↓ 1 callersMethodfix_title
(&self)
crates/ruff_linter/src/rules/pylint/rules/len_test.rs:78
↓ 1 callersFunctionfix_toml
( query: &DocumentQuery, linter_settings: &LinterSettings, source_type: TomlSourceType, encodi
crates/ruff_server/src/fix.rs:149
↓ 1 callersFunctionfix_unnecessary_call_around_sorted
(C413) Convert `list(sorted([2, 3, 1]))` to `sorted([2, 3, 1])`. (C413) Convert `reversed(sorted([2, 3, 1]))` to `sorted([2, 3, 1], reverse=True)`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:418
↓ 1 callersFunctionfix_unnecessary_collection_call
(C408) Convert `dict(a=1, b=2)` to `{"a": 1, "b": 2}`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:224
↓ 1 callersFunctionfix_unnecessary_comprehension
(C416) Convert `[i for i in x]` to `list(x)`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:578
↓ 1 callersFunctionfix_unnecessary_comprehension_in_call
(C419) Convert `[i for i in a]` into `i for i in a`
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:821
↓ 1 callersFunctionfix_unnecessary_dict_comprehension
Generate a [`Fix`] to replace a dict comprehension with `dict.fromkeys`. For example: - Given `{n: None for n in [1,2,3]}`, generate `dict.fromkeys([
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_dict_comprehension_for_iterable.rs:208
↓ 1 callersFunctionfix_unnecessary_double_cast_or_process
(C414) Convert `sorted(list(foo))` to `sorted(foo)`
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:541
↓ 1 callersFunctionfix_unnecessary_generator_dict
(C402) Convert `dict((x, x) for x in range(3))` to `{x: x for x in range(3)}`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:35
↓ 1 callersFunctionfix_unnecessary_list_call
(C411) Convert `list([i * i for i in x])` to `[i * i for i in x]`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:396
↓ 1 callersFunctionfix_unnecessary_list_comprehension_dict
(C404) Convert `dict([(i, i) for i in range(3)])` to `{i: i for i in range(3)}`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:94
↓ 1 callersFunctionfix_unnecessary_literal_dict
(C406) Convert `dict([(1, 2)])` to `{1: 2}`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:156
↓ 1 callersFunctionfix_unnecessary_literal_in_deque
( checker: &Checker, iterable: ast::ArgOrKeyword, deque: &ast::ExprCall, maxlen: Option<&Expr>
crates/ruff_linter/src/rules/ruff/rules/unnecessary_literal_within_deque_call.rs:134
↓ 1 callersFunctionfix_unnecessary_map
(C417) Convert `map(lambda x: x * 2, bar)` to `(x * 2 for x in bar)`.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:665
↓ 1 callersMethodfix_up_empty_spans_after_line_terminator
This attempts to "fix up" the spans on each annotation in the case where it's an empty span immediately following a line terminator. At present, `an
crates/ruff_db/src/diagnostic/render.rs:1000
↓ 1 callersMethodfix_violation
(&self)
crates/ruff_server/src/session/settings.rs:159
↓ 1 callersMethodfixed_back_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1766
↓ 1 callersMethodfixed_front_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1737
↓ 1 callersFunctionfixed_sequence_elements
Return a tuple or list's elements when they correspond exactly to a fixed-length sequence.
crates/ty_python_semantic/src/types/unpacker.rs:431
↓ 1 callersFunctionfixes_for_diagnostics
Converts LSP diagnostics to a list of `DiagnosticFix`es by deserializing associated data on each diagnostic.
crates/ruff_server/src/lint.rs:292
↓ 1 callersMethodfixpoint_iteration_limit
Returns the maximum number of fixpoint iterations to perform when inferring this generic call.
crates/ty_python_semantic/src/types/infer/builder.rs:5920
↓ 1 callersFunctionfixture
( checker: &Checker, name: &str, parameters: &Parameters, returns: Option<&Expr>, decorato
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:1008
↓ 1 callersFunctionfixture_decorator
(decorators: &'a [Decorator], checker: &Checker)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs:720
↓ 1 callersFunctionfixture_exposures_from_import
Follows an import to fixture exposures supplied by its target.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1287
↓ 1 callersFunctionfixture_exposures_from_stub_class_definition
Returns fixture exposures for a stub class member from its runtime source class. For example, given these corresponding files: ```python # plugin.py
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1201
↓ 1 callersFunctionfixture_name_candidates
( db: &'db dyn Db, scope: ScopeId<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:872
↓ 1 callersFunctionfixture_name_from_arguments
Classifies the `name` argument to a fixture decorator.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1328
↓ 1 callersFunctionfixture_name_literal_range
Returns the content range when `expression` spells `name` as one string literal.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1357
↓ 1 callersFunctionfixture_request_for_parameter
Returns the fixture request represented by `definition`, if it is eligible for injection.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:623
↓ 1 callersMethodfixture_request_for_parameter
Returns the fixture request represented by `definition`, if it is eligible for injection.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:489
↓ 1 callersMethodflags
Returns the [`AnyStringFlags`] for the current string-like part.
crates/ruff_python_ast/src/expression.rs:229
↓ 1 callersMethodflags
(&self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:46
↓ 1 callersFunctionflask_debug_true
S201
crates/ruff_linter/src/rules/flake8_bandit/rules/flask_debug_true.rs:54
↓ 1 callersMethodflat_group_print_mode
( &mut self, kind: TagKind, id: Option<GroupId>, args: PrintElementArgs,
crates/ruff_formatter/src/printer/mod.rs:402
↓ 1 callersFunctionflatten_iterables
Given an [`Expr`], flatten any [`Expr::Starred`] expressions and any [`Expr::BinOp`] expressions into a flat list of expressions. This should leave a
crates/ruff_linter/src/rules/flake8_bugbear/rules/except_with_non_exception_classes.rs:84
↓ 1 callersMethodflip
(self)
crates/ruff_linter/src/rules/ruff/rules/decimal_from_float_literal.rs:90
↓ 1 callersFunctionflip_execute_permission_bit
(path: &Path)
crates/ruff/src/cache.rs:796
← previousnext →9,401–9,500 of 31,562, ranked by callers