MCPcopy Create free account

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

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

↓ 1 callersFunctionunused_annotation
F842
crates/ruff_linter/src/rules/pyflakes/rules/unused_annotation.rs:45
↓ 1 callersFunctionunused_arguments
ARG001, ARG002, ARG003, ARG004, ARG005
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:431
↓ 1 callersFunctionunused_async
RUF029
crates/ruff_linter/src/rules/ruff/rules/unused_async.rs:178
↓ 1 callersFunctionunused_import
F401 For some unused binding in an import statement... __init__.py ∧ 1stpty → safe, if one __all__, add to __all__ safe, if no __all__, convert t
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:328
↓ 1 callersFunctionunused_imports_from_binding
Returns a `Vec` of bindings to unused import statements that are shadowed by a given binding. This is best explained by example. So suppose we have:
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:742
↓ 1 callersFunctionunused_imports_in_scope
Returns an iterator over bindings to import statements that appear unused. The stable behavior is to return those bindings to imports satisfying the
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:658
↓ 1 callersFunctionunused_loop_control_variable
B007
crates/ruff_linter/src/rules/flake8_bugbear/rules/unused_loop_control_variable.rs:85
↓ 1 callersFunctionunused_private_protocol
PYI046
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:250
↓ 1 callersFunctionunused_private_type_alias
PYI047
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:288
↓ 1 callersFunctionunused_private_type_var
PYI018
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:185
↓ 1 callersFunctionunused_private_typed_dict
PYI049
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:340
↓ 1 callersFunctionunused_unpacked_variable
RUF059
crates/ruff_linter/src/rules/ruff/rules/unused_unpacked_variable.rs:91
↓ 1 callersFunctionunused_variable
F841
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:259
↓ 1 callersFunctionunwrap_annotated
Unwrap `Annotated[X, ...]` and `C[T]` to the innermost type expression.
crates/ruff_linter/src/rules/flake8_self/rules/private_member_access.rs:346
↓ 1 callersMethodunwrap_any
Unwraps the any value. # Panics If `self` is not a [`BufferSnapshot::Any`].
crates/ruff_formatter/src/buffer.rs:116
↓ 1 callersMethodunwrap_operand
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:726
↓ 1 callersMethodunwrap_operator
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:735
↓ 1 callersMethodunwrap_position
Unwraps the position value. # Panics If self is not a [`BufferSnapshot::Position`]
crates/ruff_formatter/src/buffer.rs:104
↓ 1 callersMethodunwrap_with_diagnostic
Safely unwrap the place and the qualifiers into a [`TypeAndQualifiers`]. If the place is definitely unbound or possibly unbound, it will be transform
crates/ty_python_semantic/src/place.rs:1189
↓ 1 callersMethodupdate
(props: PlaygroundServerProps, isViewingVendoredFile: boolean)
playground/ty/src/Editor/Editor.tsx:498
↓ 1 callersMethodupdate
(&mut self, db: &mut ProjectDatabase)
crates/ty_project/src/watch/project_watcher.rs:47
↓ 1 callersMethodupdate
Updates project watch paths, starting a new reconciliation cycle when idle.
crates/ty_server/src/session/file_watcher.rs:87
↓ 1 callersMethodupdate
Updates the nesting depth while tolerating unmatched closing brackets. For example, `'('` increments the parenthesis depth and a later `')'` decremen
crates/ty_ide/src/docstring/document/syntax.rs:539
↓ 1 callersMethodupdate
Merge another expanded argument list's bindings into this snapshot. Both snapshots must originate from the same snapshotter, so their overload indexes
crates/ty_python_semantic/src/types/call/bind.rs:9775
↓ 1 callersMethodupdate
(&mut self, other: Self)
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:109
↓ 1 callersMethodupdate
(&mut self, line: &LogicalLineInfo)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:669
↓ 1 callersFunctionupdateFile
( workspace: Workspace, handle: FileHandle, content: string, setError: (error: string | null) => void,
playground/ty/src/Playground.tsx:664
↓ 1 callersFunctionupdateMarkers
(monaco: Monaco, diagnostics: Array<Diagnostic>)
playground/ruff/src/Editor/SourceEditor.tsx:182
↓ 1 callersMethodupdateMarkers
(diagnostics: Array<Diagnostic>, hints: Array<Hint>)
playground/ty/src/Editor/Editor.tsx:581
↓ 1 callersFunctionupdateRanges
()
playground/ruff/src/Editor/SecondaryPanel.tsx:100
↓ 1 callersMethodupdate_all_by_call_idiom
Processes a call idiom for `__all__` and updates the set of names accordingly. Returns `true` if the call idiom is recognized and valid, `false` othe
crates/ty_ide/src/symbols.rs:1051
↓ 1 callersMethodupdate_analysis_options
(&mut self, options: Option<&Analysis>)
crates/ty_test/src/db.rs:73
↓ 1 callersMethodupdate_cell_offsets
Update the cell offsets as per the given [`SourceMap`].
crates/ruff_notebook/src/notebook.rs:251
↓ 1 callersFunctionupdate_context
( token: SimpleToken, prev: SimpleToken, prev_prev: SimpleToken, stack: &mut Vec<Context>, )
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:419
↓ 1 callersMethodupdate_dependency_metadata
(&mut self, metadata: Option<&DependencyMetadata>)
crates/ty_test/src/db.rs:82
↓ 1 callersMethodupdate_enclosing_snapshot
( &mut self, snapshot_id: ScopedEnclosingSnapshotId, enclosing_symbol: ScopedSymbolId,
crates/ty_python_core/src/use_def.rs:3114
↓ 1 callersMethodupdate_exit
Point the current exit to block at provided index
crates/ruff_python_semantic/src/cfg/graph.rs:287
↓ 1 callersMethodupdate_file
(&mut self, file_id: &FileHandle, contents: &str)
crates/ty_wasm/src/lib.rs:210
↓ 1 callersMethodupdate_lazy_snapshots
Any lazy snapshots of the place that have been reassigned are obsolete, so update them. ```py def outer() -> None: x = None def inner2() -> None: # `
crates/ty_python_core/src/builder.rs:806
↓ 1 callersMethodupdate_max_precedence
(&mut self, precedence: OperatorPrecedence, count: usize)
crates/ruff_python_formatter/src/pattern/mod.rs:357
↓ 1 callersMethodupdate_max_precedence
(&mut self, precedence: OperatorPrecedence)
crates/ruff_python_formatter/src/expression/mod.rs:625
↓ 1 callersMethodupdate_mdtest_rule_selection
( &mut self, rules: Option<&Rules>, required_rule: Option<&str>, )
crates/ty_test/src/db.rs:89
↓ 1 callersMethodupdate_next_request
Updates the synchronization to run after the active request. If `request` matches the active synchronization, removes any previously requested follow
crates/ty_project/src/uv/environments.rs:711
↓ 1 callersMethodupdate_notebook_document
( &mut self, notebook_key: &DocumentKey, cells: Option<lsp_types::NotebookDocumentCell
crates/ty_server/src/session/index.rs:69
↓ 1 callersMethodupdate_notebook_document
( &mut self, key: &DocumentKey, cells: Option<lsp_types::NotebookDocumentCellChanges>,
crates/ruff_server/src/session/index.rs:141
↓ 1 callersMethodupdate_once
Returns whether newly covered paths were refreshed.
crates/ty_project/src/watch/project_watcher.rs:70
↓ 1 callersMethodupdate_origin
Updates the origin of `__all__` in the current module. This will clear existing names if the origin is changed to mimic the behavior of overriding `_
crates/ty_python_semantic/src/dunder_all.rs:68
↓ 1 callersFunctionupdate_schemastore
( schemastore_path: Path, schemastore_repos: SchemastoreRepos )
scripts/update_schemastore.py:88
↓ 1 callersMethodupdate_settings_diagnostics
Replace stored settings diagnostics after recomputing program settings. This is used when a change affects [`ty_python_core::program::ProgramSettings
crates/ty_project/src/lib.rs:510
↓ 1 callersMethodupdate_text_document
( &mut self, session: &mut Session, client: &Client, content_changes: Vec<Text
crates/ty_server/src/session.rs:2048
↓ 1 callersMethodupdate_text_document
( &mut self, key: &DocumentKey, content_changes: Vec<lsp_types::TextDocumentContentCha
crates/ruff_server/src/session/index.rs:105
↓ 1 callersMethodupdate_version
(&mut self, new_version: DocumentVersion)
crates/ruff_server/src/edit/text_document.rs:134
↓ 1 callersMethodupdated_implementation_signature
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1296
↓ 1 callersFunctionupload_html_report
( files: dict[str, tuple[str, str]], artifact: dict, *, prefix: str, bucket: str, base
scripts/publish_pr_report.py:188
↓ 1 callersMethodupper_bound_for
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/constraints/variables.rs:626
↓ 1 callersMethodupstream_category
(&self, linter: &Linter)
crates/ruff_linter/src/upstream_categories.rs:32
↓ 1 callersMethoduri
Returns the root URI of the workspace.
crates/ruff_server/src/workspace.rs:110
↓ 1 callersFunctionusage_is_safe
Check if the current expression has the pattern `foo.replace(tzinfo=bar)` or `foo.time()`.
crates/ruff_linter/src/rules/flake8_datetimez/rules/datetime_min_max.rs:92
↓ 1 callersFunctionuseCheckResult
( files: ReadonlyFiles, workspace: Workspace, secondaryTool: SecondaryTool | null, currentVendoredFile
playground/ty/src/Editor/Chrome.tsx:270
↓ 1 callersFunctionusePersistLocally
* Persists the files to local storage. This is done deferred to avoid too frequent writes.
playground/ty/src/Playground.tsx:357
↓ 1 callersFunctionuse_capital_environment_variables
SIM112
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs:141
↓ 1 callersMethoduse_id
(&self, key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/ast_ids.rs:245
↓ 1 callersMethoduse_in_memory_system
(&mut self)
crates/ty_test/src/db.rs:109
↓ 1 callersMethoduse_in_memory_system
(&mut self)
crates/ruff_mdtest/src/db.rs:20
↓ 1 callersFunctionuse_initvar
Generate a [`Fix`] to transform a `__post_init__` default argument into a `dataclasses.InitVar` pseudo-field.
crates/ruff_linter/src/rules/ruff/rules/post_init_default.rs:136
↓ 1 callersFunctionuse_of_pd_merge
PD015
crates/ruff_linter/src/rules/pandas_vet/rules/pd_merge.rs:61
↓ 1 callersFunctionuse_of_read_table
PD012
crates/ruff_linter/src/rules/pandas_vet/rules/read_table.rs:52
↓ 1 callersMethoduse_os_system_with_temp_dir
(&mut self, cwd: SystemPathBuf, temp_dir: TempDir)
crates/ty_test/src/db.rs:104
↓ 1 callersFunctionuse_pep585_annotation
UP006
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep585_annotation.rs:88
↓ 1 callersFunctionuse_pep604_isinstance
UP038
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs:93
↓ 1 callersFunctionuse_pep646_unpack
UP044
crates/ruff_linter/src/rules/pyupgrade/rules/non_pep646_unpack.rs:61
↓ 1 callersFunctionused
(do)
crates/ruff_linter/resources/test/fixtures/flake8_boolean_trap/FBT.py:37
↓ 1 callersFunctionused_dummy_variable
RUF052
crates/ruff_linter/src/rules/ruff/rules/used_dummy_variable.rs:103
↓ 1 callersMethodused_len
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1703
↓ 1 callersFunctionuseless_class_metaclass_type
UP050
crates/ruff_linter/src/rules/pyupgrade/rules/useless_class_metaclass_type.rs:53
↓ 1 callersFunctionuseless_comparison
B015
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_comparison.rs:62
↓ 1 callersFunctionuseless_contextlib_suppress
B022
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_contextlib_suppress.rs:55
↓ 1 callersFunctionuseless_else_on_loop
PLW0120
crates/ruff_linter/src/rules/pylint/rules/useless_else_on_loop.rs:75
↓ 1 callersFunctionuseless_exception_statement
PLW0133
crates/ruff_linter/src/rules/pylint/rules/useless_exception_statement.rs:61
↓ 1 callersFunctionuseless_expression
B018
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_expression.rs:76
↓ 1 callersFunctionuseless_finally
RUF072
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:80
↓ 1 callersFunctionuseless_if_else
RUF034
crates/ruff_linter/src/rules/ruff/rules/useless_if_else.rs:37
↓ 1 callersFunctionuseless_import_alias
PLC0414
crates/ruff_linter/src/rules/pylint/rules/useless_import_alias.rs:72
↓ 1 callersFunctionuseless_import_from_alias
PLC0414
crates/ruff_linter/src/rules/pylint/rules/useless_import_alias.rs:106
↓ 1 callersFunctionuseless_metaclass_type
UP001
crates/ruff_linter/src/rules/pyupgrade/rules/useless_metaclass_type.rs:48
↓ 1 callersFunctionuseless_object_inheritance
UP004
crates/ruff_linter/src/rules/pyupgrade/rules/useless_object_inheritance.rs:54
↓ 1 callersFunctionuseless_return
PLR1711
crates/ruff_linter/src/rules/pylint/rules/useless_return.rs:54
↓ 1 callersFunctionuseless_try_except
TRY203 (previously TRY302)
crates/ruff_linter/src/rules/tryceratops/rules/useless_try_except.rs:44
↓ 1 callersFunctionuseless_with_lock
PLW2101
crates/ruff_linter/src/rules/pylint/rules/useless_with_lock.rs:63
↓ 1 callersMethoduser_config_directory
(&self)
crates/ty_test/src/db.rs:574
↓ 1 callersMethoduser_symbol
(self)
crates/ruff_linter/src/rules/refurb/rules/subclass_builtin.rs:152
↓ 1 callersFunctionuses_magic_variable_access
Return `true` if the body uses `locals()`, `globals()`, `vars()`, `eval()`. Accepts a closure that determines whether a given name (e.g., `"list"`) i
crates/ruff_python_ast/src/helpers.rs:926
↓ 1 callersMethoduv_diagnostic
(&self, db: &dyn Db)
crates/ty_project/src/metadata.rs:442
↓ 1 callersMethoduv_environments_changed
( &mut self, client: &Client, project_root: &SystemPath, changes: UvSyncChange
crates/ty_server/src/session.rs:317
↓ 1 callersMethoduv_sync_wakeups
Returns each project's background uv synchronization wakeups.
crates/ty_server/src/session.rs:281
↓ 1 callersMethodvalid_keywords
Returns a set of keywords that are valid at the current cursor position. Returns None if no context-based exclusions can be identified. Meaning that
crates/ty_ide/src/completion.rs:1472
↓ 1 callersFunctionvalidate
(self, value)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM222.py:17
↓ 1 callersMethodvalidate
Asserts that suggestions and enumerated modules match the fixture's expectations, so that we can ensure that the benchmark scenario is accurate. For
crates/ruff_benchmark/benches/ty_ide.rs:392
↓ 1 callersMethodvalidate_annotated_assignment_target
Validate that the given expression is a valid annotated assignment target. Unlike [`Parser::validate_assignment_target`], starred, list and tuple exp
crates/ruff_python_parser/src/parser/statement.rs:3873
↓ 1 callersMethodvalidate_arguments
Performs the following validations on the arguments: - Generator expressions are parenthesized when required by the argument context.
crates/ruff_python_parser/src/parser/expression.rs:2986
← previousnext →13,901–14,000 of 31,562, ranked by callers