MCPcopy Create free account

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

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

↓ 1 callersMethodrecover
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/type_alias.rs:160
↓ 1 callersFunctionrecover_parameter_without_type
Implements a simple heuristic to recover a parameter name and description from a line with a malformed type. This assumes the first `" ("` begins the
crates/ty_ide/src/docstring/document/google.rs:110
↓ 1 callersMethodrecursive_identity
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:87
↓ 1 callersMethodrecursive_type_expression_definition
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:609
↓ 1 callersFunctionrecursive_type_normalize_type_guard_like
Helper for `recursive_type_normalized_impl` for `TypeGuardLike` types.
crates/ty_python_semantic/src/types.rs:2365
↓ 1 callersMethodrecursive_type_normalized_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, div: Type<'db>,
crates/ty_python_semantic/src/types/class.rs:426
↓ 1 callersMethodrecursive_type_pair_fallback
( &self, db: &'db dyn Db, source: Type<'db>, target: Type<'db>, )
crates/ty_python_semantic/src/types/relation.rs:1899
↓ 1 callersFunctionredeclared_assigned_name
PLW0128
crates/ruff_linter/src/rules/pylint/rules/redeclared_assigned_name.rs:52
↓ 1 callersFunctionredefined_argument_from_local
PLR1704
crates/ruff_linter/src/rules/pylint/rules/redefined_argument_from_local.rs:51
↓ 1 callersFunctionredefined_loop_name
PLW2901
crates/ruff_linter/src/rules/pylint/rules/redefined_loop_name.rs:370
↓ 1 callersFunctionredefined_slots_in_subclass
PLW0244
crates/ruff_linter/src/rules/pylint/rules/redefined_slots_in_subclass.rs:57
↓ 1 callersFunctionredefined_while_unused
F811
crates/ruff_linter/src/rules/pyflakes/rules/redefined_while_unused.rs:96
↓ 1 callersMethodredefines
Return `true` if this binding "redefines" the given binding, as per Pyflake's definition of redefinition.
crates/ruff_python_semantic/src/binding.rs:183
↓ 1 callersFunctionredirected_file_noqa
RUF101 for file noqa directives
crates/ruff_linter/src/rules/ruff/rules/redirected_noqa.rs:66
↓ 1 callersFunctionredirected_noqa
RUF101 for in-line noqa directives
crates/ruff_linter/src/rules/ruff/rules/redirected_noqa.rs:55
↓ 1 callersFunctionreducible_re_method
If `pattern.<attr>(<arguments>)` is equivalent to a call to the top-level `re.<attr>(...)`, returns that function's name. `search`, `match`, `fullmat
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression_compile.rs:90
↓ 1 callersFunctionredundant_backslash
E502
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/redundant_backslash.rs:49
↓ 1 callersFunctionredundant_bool_literal
RUF038
crates/ruff_linter/src/rules/ruff/rules/redundant_bool_literal.rs:86
↓ 1 callersFunctionredundant_final_literal
PYI064
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_final_literal.rs:61
↓ 1 callersFunctionredundant_literal_union
PYI051
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_literal_union.rs:69
↓ 1 callersFunctionredundant_log_base
FURB163
crates/ruff_linter/src/rules/refurb/rules/redundant_log_base.rs:80
↓ 1 callersFunctionredundant_none_literal
PYI061
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_none_literal.rs:88
↓ 1 callersFunctionredundant_numeric_union
PYI041
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_numeric_union.rs:85
↓ 1 callersFunctionredundant_open_modes
UP015
crates/ruff_linter/src/rules/pyupgrade/rules/redundant_open_modes.rs:62
↓ 1 callersFunctionredundant_tuple_in_exception_handler
B013
crates/ruff_linter/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs:62
↓ 1 callersFunctionreferences_for_file
Find all references to a local symbol within the current file. The behavior depends on the provided mode.
crates/ty_ide/src/references.rs:303
↓ 1 callersFunctionreferences_for_keyword_arguments_in_file
( db: &dyn Db, file: ProgramFile<'_>, search: &LocalReferenceSearch<'_>, mode: ReferencesMode,
crates/ty_ide/src/references.rs:241
↓ 1 callersMethodreferences_typevar_through_aliases
Returns whether this type might reference `typevar_id`, including type-alias arguments. Other non-lazy type-variable visitors stop at type aliases be
crates/ty_python_semantic/src/types/typevar.rs:95
↓ 1 callersMethodreflect
(self)
crates/ty_python_semantic/src/types/infer/comparisons.rs:662
↓ 1 callersMethodreflected
(self)
crates/ty_python_semantic/src/types/narrow.rs:1652
↓ 1 callersMethodreflected_dunder
Returns the reflected dunder method name for the operator.
crates/ruff_python_ast/src/nodes.rs:2873
↓ 1 callersFunctionregex_flag_alias
FURB167
crates/ruff_linter/src/rules/refurb/rules/regex_flag_alias.rs:55
↓ 1 callersFunctionregex_module_and_func
( semantic: &SemanticModel<'model>, expr: &'model Expr, )
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:162
↓ 1 callersMethodregisterModelChanged
( name: string, handle: FileHandle | null, model: editor.ITextModel, )
playground/ty/src/Playground.tsx:747
↓ 1 callersMethodregister_capabilities
Registers the dynamic capabilities with the client as per the resolved global settings. ## Diagnostic capability This capability is used to enable /
crates/ty_server/src/session.rs:1105
↓ 1 callersMethodregister_dynamic_capability
Registers a list of dynamic capabilities with the client.
crates/ty_server/src/session.rs:1176
↓ 1 callersMethodregister_narrowing_alias_predicates
Register alias predicates for alias Names found in a predicate expression.
crates/ty_python_core/src/builder.rs:1261
↓ 1 callersMethodregister_pending_capture
(&mut self, capture: UnresolvedCapture)
crates/ty_python_core/src/builder.rs:616
↓ 1 callersFunctionregister_rules
Generate the `Rule` enum
crates/ruff_macros/src/map_codes.rs:414
↓ 1 callersMethodregister_standalone_suppression
Handles a single-comment suppression like `ruff: ignore` or `ruff: file-ignore` and returns `true` if such a comment was found.
crates/ruff_linter/src/suppression.rs:891
↓ 1 callersMethodregister_workspace_folder
Adds an uninitialized workspace to this session. This returns `true` when this workspace is added and `false` when it has already been added. If the
crates/ty_server/src/session.rs:872
↓ 1 callersFunctionregular
(bencher: Bencher, scenario: &Scenario)
crates/ruff_benchmark/benches/ty_ide.rs:487
↓ 1 callersFunctionreimplemented_container_builtin
PIE807
crates/ruff_linter/src/rules/flake8_pie/rules/reimplemented_container_builtin.rs:63
↓ 1 callersFunctionreimplemented_starmap
FURB140
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:71
↓ 1 callersMethodrelation_bases
Walk the bases that can match a nominal relation to `target`. The lazy first entry always has the source's origin, even when a bare class is specializ
crates/ty_python_semantic/src/types/mro.rs:736
↓ 1 callersMethodrelative
Returns the relative path of this glob pattern.
crates/ty_project/src/glob/portable.rs:240
↓ 1 callersFunctionrelative_desperate_search_paths
( db: &dyn Db, importing_file: ResolverFile<'_>, )
crates/ty_module_resolver/src/resolve.rs:650
↓ 1 callersFunctionrelative_module_name
Given a `from .foo import bar` relative import, resolve the relative module we're importing `bar` from into an absolute [`ModuleName`] using the name
crates/ty_module_resolver/src/module_name.rs:541
↓ 1 callersMethodrelative_path
(&self)
crates/mdtest/src/parser.rs:415
↓ 1 callersMethodrelative_stdlib_path
Return the relative path from `sys.prefix` to the directory containing the Python stdlib's `.py` files if the interpreter layout is known.
crates/ty_site_packages/src/lib.rs:669
↓ 1 callersFunctionrelative_watcher
(path: &SystemPath, pattern: &str)
crates/ty_server/src/session/file_watcher.rs:400
↓ 1 callersFunctionrelativize_path_to
Convert an absolute path to be relative to the specified project root.
crates/ruff_db/src/diagnostic/render/gitlab.rs:172
↓ 1 callersMethodrelativize_vendored_path
(&self, path: &VendoredPath)
crates/ty_module_resolver/src/path.rs:785
↓ 1 callersMethodreload_settings
Reload the settings for all the workspace folders that contain the changed files. This method avoids re-indexing the same workspace multiple times if
crates/ruff_server/src/session/index.rs:263
↓ 1 callersFunctionrelocate_expr
Change an expression's location (recursively) to match a desired, fixed range.
crates/ruff_python_ast/src/relocate.rs:9
↓ 1 callersFunctionremaining_budget
(values: &[ast::Expr], remaining: usize)
crates/ty_python_semantic/src/types/unpacker.rs:661
↓ 1 callersMethodremaining_literal_type
Build the type for one remaining canonical member, preserving any positive rest components.
crates/ty_python_semantic/src/types/enums.rs:812
↓ 1 callersFunctionremove_cast
Generate a [`Fix`] to remove a `list` cast from an expression.
crates/ruff_linter/src/rules/perflint/rules/unnecessary_list_cast.rs:144
↓ 1 callersFunctionremove_comment_fix
(suppression: &Suppression, source: &str, tokens: &Tokens)
crates/ty_python_semantic/src/suppression/unused.rs:216
↓ 1 callersFunctionremove_directory
()
crates/ruff_db/src/system/memory_fs.rs:1020
↓ 1 callersFunctionremove_else
Generate a [`Fix`] to remove an `else` or `elif` clause.
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:813
↓ 1 callersFunctionremove_else
Generate a [`Fix`] to remove the `else` clause from the given statement.
crates/ruff_linter/src/rules/pylint/rules/useless_else_on_loop.rs:138
↓ 1 callersMethodremove_env_var
Removes an environment variable override, making it appear as not set.
crates/ruff_db/src/system/test.rs:72
↓ 1 callersFunctionremove_exception_handler_assignment
Generate a [`Edit`] to remove the binding from an exception handler.
crates/ruff_linter/src/rules/pyflakes/fixes.rs:110
↓ 1 callersMethodremove_file
(&self, path: &SystemPath)
crates/ruff_db/src/system/test.rs:241
↓ 1 callersMethodremove_files_under
(self, db: &mut dyn Db, paths: I)
crates/ty_project/src/lib.rs:704
↓ 1 callersFunctionremove_imports
Given an import statement, remove any imports that are specified in the `imports` iterator. Returns `Ok(None)` if the statement is empty after removi
crates/ruff_linter/src/fix/codemods.rs:42
↓ 1 callersFunctionremove_invalid_noqa
(codes: &Codes, invalid_code: &Code, locator: &Locator)
crates/ruff_linter/src/rules/ruff/rules/invalid_rule_code.rs:184
↓ 1 callersMethodremove_negative
(&mut self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:2047
↓ 1 callersFunctionremove_pep695_typevar_declaration
Create an [`Edit`] removing the `TypeVar` binding from the PEP 695 type parameter list. Return `None` if we fail to find a `TypeVar` that matches the
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:441
↓ 1 callersMethodremove_positive
Remove the actual stored element when its resolved value satisfies a simplification rule.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:2036
↓ 1 callersFunctionremove_specifiers
Remove the explicit positional indices from a format string.
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:145
↓ 1 callersFunctionremove_unused_format_arguments_from_dict
Generate a [`Edit`] to remove unused keys from format dict.
crates/ruff_linter/src/rules/pyflakes/fixes.rs:17
↓ 1 callersFunctionremove_unused_keyword_arguments_from_format_call
Generate a [`Edit`] to remove unused keyword arguments from a `format` call.
crates/ruff_linter/src/rules/pyflakes/fixes.rs:41
↓ 1 callersFunctionremove_unused_positional_arguments_from_format_call
Generate a [`Edit`] to remove unused positional arguments from a `format` call.
crates/ruff_linter/src/rules/pyflakes/fixes.rs:69
↓ 1 callersFunctionremove_unused_variable
Generate a [`Edit`] to remove an unused variable assignment to a [`Binding`].
crates/ruff_linter/src/rules/ruff/rules/unused_unpacked_variable.rs:70
↓ 1 callersFunctionremove_unused_variable
Generate a [`Edit`] to remove an unused variable assignment to a [`Binding`].
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:158
↓ 1 callersMethodremove_workspace_folder
Removes a workspace folder at the given URI. This removes the workspace folder and its associated project database, and clears diagnostics for any do
crates/ty_server/src/session.rs:991
↓ 1 callersMethodremoved
(since: &'static str, reason: &'static str)
crates/ty_python_semantic/src/lint.rs:218
↓ 1 callersMethodrename
( &self, file_id: &FileHandle, position: Position, new_name: &str, )
crates/ty_wasm/src/lib.rs:461
↓ 1 callersMethodrenameDocument
( oldName: string, newName: string, newHandle: FileHandle | null, )
playground/ty/src/Playground.tsx:710
↓ 1 callersFunctionrename_edits
Computes rename edits and shows their ranges and replacements in the original sources.
crates/ty_ide/src/will_rename.rs:1932
↓ 1 callersFunctionrename_parameter
Rename the first parameter to `self` or `cls`, if no other parameter has the target name.
crates/ruff_linter/src/rules/pep8_naming/rules/invalid_first_argument_name.rs:289
↓ 1 callersFunctionrenamed_rule
`RUF202`
crates/ruff_linter/src/rules/ruff/rules/renamed_rule.rs:63
↓ 1 callersFunctionrender
Render selected reproducers and unchecked seeds with any omission notices.
python/py-fuzzer/fuzz.py:624
↓ 1 callersFunctionrender
Render an environment variable and its documentation.
crates/ruff_dev/src/generate_ty_env_vars_reference.rs:116
↓ 1 callersMethodrender
(&self, output: &mut String)
crates/ty_ide/src/docstring/markdown/structured.rs:252
↓ 1 callersMethodrender
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, relation: ErrorRelati
crates/ty_python_semantic/src/types/relation_error.rs:251
↓ 1 callersMethodrender
(&self, source: &str)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:132
↓ 1 callersFunctionrender_bold_text_into
Wraps `text` in Markdown strong emphasis and appends it to output.
crates/ty_ide/src/docstring/markdown/structured.rs:501
↓ 1 callersFunctionrender_code_span_into
Wraps `text` in a Markdown code span and appends it to output.
crates/ty_ide/src/docstring/markdown/structured.rs:519
↓ 1 callersMethodrender_diagnostic
(&self, diagnostic: D)
crates/ty_ide/src/inlay_hints.rs:1478
↓ 1 callersFunctionrender_diagnostics
(db: &dyn Db, tool_name: &'static str, diagnostics: &[Diagnostic])
crates/mdtest/src/lib.rs:335
↓ 1 callersFunctionrender_diff
(f: &mut dyn std::fmt::Write, expected: &str, actual: &str)
crates/mdtest/src/lib.rs:475
↓ 1 callersFunctionrender_diff_row
(diagnostics: list[TyDiagnostic], *, removed: bool = False)
scripts/conformance.py:415
↓ 1 callersFunctionrender_edits
(db: &TestDb, mut edits: Vec<FileRenameEdit>)
crates/ty_ide/src/will_rename.rs:1939
↓ 1 callersFunctionrender_file_stats_table
Render a per-file breakdown showing only files whose TP/FP/FN counts changed.
scripts/conformance.py:782
↓ 1 callersFunctionrender_html_diff_row
Render a single HTML <tr> with a test-case link and a markdown diff block.
scripts/conformance.py:358
↓ 1 callersMethodrender_inline
(&mut self, text: &str, source_indentation: usize, render_rst_links: bool)
crates/ty_ide/src/docstring/markdown/general.rs:391
↓ 1 callersFunctionrender_into
Renders a docstring as Markdown. `source` must have already undergone PEP-257 trimming and universal newline normalization (typically via `docstring:
crates/ty_ide/src/docstring/markdown/structured.rs:22
← previousnext →12,601–12,700 of 31,562, ranked by callers