Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 1 callers
Function
unused_private_protocol
PYI046
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:250
↓ 1 callers
Function
unused_private_type_alias
PYI047
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:288
↓ 1 callers
Function
unused_private_type_var
PYI018
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:185
↓ 1 callers
Function
unused_private_typed_dict
PYI049
crates/ruff_linter/src/rules/flake8_pyi/rules/unused_private_type_definition.rs:340
↓ 1 callers
Function
unused_unpacked_variable
RUF059
crates/ruff_linter/src/rules/ruff/rules/unused_unpacked_variable.rs:91
↓ 1 callers
Function
unused_variable
F841
crates/ruff_linter/src/rules/pyflakes/rules/unused_variable.rs:264
↓ 1 callers
Function
unwrap_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 callers
Method
unwrap_any
Unwraps the any value. # Panics If `self` is not a [`BufferSnapshot::Any`].
crates/ruff_formatter/src/buffer.rs:116
↓ 1 callers
Method
unwrap_operand
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:726
↓ 1 callers
Method
unwrap_operator
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:735
↓ 1 callers
Method
unwrap_position
Unwraps the position value. # Panics If self is not a [`BufferSnapshot::Position`]
crates/ruff_formatter/src/buffer.rs:104
↓ 1 callers
Method
unwrap_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:1179
↓ 1 callers
Method
update
(props: PlaygroundServerProps, isViewingVendoredFile: boolean)
playground/ty/src/Editor/Editor.tsx:498
↓ 1 callers
Method
update
(&mut self, db: &mut ProjectDatabase)
crates/ty_project/src/watch/project_watcher.rs:47
↓ 1 callers
Method
update
Updates project watch paths, starting a new reconciliation cycle when idle.
crates/ty_server/src/session/file_watcher.rs:87
↓ 1 callers
Method
update
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 callers
Method
update
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:9960
↓ 1 callers
Method
update
(&mut self, other: Self)
crates/ruff_linter/src/rules/pycodestyle/rules/invalid_escape_sequence.rs:109
↓ 1 callers
Method
update
(&mut self, line: &LogicalLineInfo)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:669
↓ 1 callers
Function
updateFile
( workspace: Workspace, handle: FileHandle, content: string, setError: (error: string | null) => void,
playground/ty/src/Playground.tsx:664
↓ 1 callers
Function
updateMarkers
(monaco: Monaco, diagnostics: Array<Diagnostic>)
playground/ruff/src/Editor/SourceEditor.tsx:182
↓ 1 callers
Method
updateMarkers
(diagnostics: Array<Diagnostic>, hints: Array<Hint>)
playground/ty/src/Editor/Editor.tsx:581
↓ 1 callers
Function
updateRanges
()
playground/ruff/src/Editor/SecondaryPanel.tsx:100
↓ 1 callers
Method
update_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 callers
Method
update_analysis_options
(&mut self, options: Option<&Analysis>)
crates/ty_test/src/db.rs:73
↓ 1 callers
Method
update_cell_offsets
Update the cell offsets as per the given [`SourceMap`].
crates/ruff_notebook/src/notebook.rs:254
↓ 1 callers
Function
update_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 callers
Method
update_dependency_metadata
(&mut self, metadata: Option<&DependencyMetadata>)
crates/ty_test/src/db.rs:82
↓ 1 callers
Method
update_enclosing_snapshot
( &mut self, snapshot_id: ScopedEnclosingSnapshotId, enclosing_symbol: ScopedSymbolId,
crates/ty_python_core/src/use_def.rs:3114
↓ 1 callers
Method
update_exit
Point the current exit to block at provided index
crates/ruff_python_semantic/src/cfg/graph.rs:287
↓ 1 callers
Method
update_file
(&mut self, file_id: &FileHandle, contents: &str)
crates/ty_wasm/src/lib.rs:210
↓ 1 callers
Method
update_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 callers
Method
update_max_precedence
(&mut self, precedence: OperatorPrecedence, count: usize)
crates/ruff_python_formatter/src/pattern/mod.rs:355
↓ 1 callers
Method
update_max_precedence
(&mut self, precedence: OperatorPrecedence)
crates/ruff_python_formatter/src/expression/mod.rs:625
↓ 1 callers
Method
update_mdtest_rule_selection
( &mut self, rules: Option<&Rules>, required_rule: Option<&str>, )
crates/ty_test/src/db.rs:89
↓ 1 callers
Method
update_next_request
Updates the synchronization to run after the active request. A changed request cancels the queued job. An already running uv process can finish.
crates/ty_project/src/uv/environments.rs:716
↓ 1 callers
Method
update_notebook_document
( &mut self, notebook_key: &DocumentKey, cells: Option<lsp_types::NotebookDocumentCell
crates/ty_server/src/session/index.rs:69
↓ 1 callers
Method
update_notebook_document
( &mut self, key: &DocumentKey, cells: Option<lsp_types::NotebookDocumentCellChanges>,
crates/ruff_server/src/session/index.rs:141
↓ 1 callers
Method
update_once
Returns whether newly covered paths were refreshed.
crates/ty_project/src/watch/project_watcher.rs:70
↓ 1 callers
Method
update_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 callers
Function
update_schemastore
( schemastore_path: Path, schemastore_repos: SchemastoreRepos )
scripts/update_schemastore.py:70
↓ 1 callers
Method
update_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:511
↓ 1 callers
Method
update_text_document
( &mut self, session: &mut Session, client: &Client, content_changes: Vec<Text
crates/ty_server/src/session.rs:2076
↓ 1 callers
Method
update_text_document
( &mut self, key: &DocumentKey, content_changes: Vec<lsp_types::TextDocumentContentCha
crates/ruff_server/src/session/index.rs:105
↓ 1 callers
Method
update_version
(&mut self, new_version: DocumentVersion)
crates/ruff_server/src/edit/text_document.rs:134
↓ 1 callers
Method
updated_implementation_signature
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1296
↓ 1 callers
Function
upload_html_report
( files: dict[str, tuple[str, str]], artifact: dict[str, Any], *, prefix: str, bucket: str
scripts/publish_pr_report.py:190
↓ 1 callers
Method
upper_bound_for
( self, db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/constraints/variables.rs:626
↓ 1 callers
Method
upstream_category
(&self, linter: &Linter)
crates/ruff_linter/src/upstream_categories.rs:32
↓ 1 callers
Method
uri
Returns the root URI of the workspace.
crates/ruff_server/src/workspace.rs:110
↓ 1 callers
Function
usage_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 callers
Function
useCheckResult
( files: ReadonlyFiles, workspace: Workspace, secondaryTool: SecondaryTool | null, currentVendoredFile
playground/ty/src/Editor/Chrome.tsx:270
↓ 1 callers
Function
usePersistLocally
* Persists the files to local storage. This is done deferred to avoid too frequent writes.
playground/ty/src/Playground.tsx:357
↓ 1 callers
Function
use_capital_environment_variables
SIM112
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs:141
↓ 1 callers
Method
use_id
(&self, key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/ast_ids.rs:245
↓ 1 callers
Method
use_in_memory_system
(&mut self)
crates/ty_test/src/db.rs:109
↓ 1 callers
Method
use_in_memory_system
(&mut self)
crates/ruff_mdtest/src/db.rs:20
↓ 1 callers
Function
use_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 callers
Function
use_of_pd_merge
PD015
crates/ruff_linter/src/rules/pandas_vet/rules/pd_merge.rs:61
↓ 1 callers
Function
use_of_read_table
PD012
crates/ruff_linter/src/rules/pandas_vet/rules/read_table.rs:52
↓ 1 callers
Method
use_os_system_with_temp_dir
(&mut self, cwd: SystemPathBuf, temp_dir: TempDir)
crates/ty_test/src/db.rs:104
↓ 1 callers
Function
use_pep585_annotation
UP006
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep585_annotation.rs:88
↓ 1 callers
Function
use_pep604_isinstance
UP038
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs:93
↓ 1 callers
Function
use_pep646_unpack
UP044
crates/ruff_linter/src/rules/pyupgrade/rules/non_pep646_unpack.rs:61
↓ 1 callers
Function
used
(do)
crates/ruff_linter/resources/test/fixtures/flake8_boolean_trap/FBT.py:37
↓ 1 callers
Function
used_dummy_variable
RUF052
crates/ruff_linter/src/rules/ruff/rules/used_dummy_variable.rs:103
↓ 1 callers
Method
used_len
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1743
↓ 1 callers
Function
useless_class_metaclass_type
UP050
crates/ruff_linter/src/rules/pyupgrade/rules/useless_class_metaclass_type.rs:53
↓ 1 callers
Function
useless_comparison
B015
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_comparison.rs:62
↓ 1 callers
Function
useless_contextlib_suppress
B022
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_contextlib_suppress.rs:55
↓ 1 callers
Function
useless_else_on_loop
PLW0120
crates/ruff_linter/src/rules/pylint/rules/useless_else_on_loop.rs:75
↓ 1 callers
Function
useless_exception_statement
PLW0133
crates/ruff_linter/src/rules/pylint/rules/useless_exception_statement.rs:61
↓ 1 callers
Function
useless_expression
B018
crates/ruff_linter/src/rules/flake8_bugbear/rules/useless_expression.rs:76
↓ 1 callers
Function
useless_finally
RUF072
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:80
↓ 1 callers
Function
useless_if_else
RUF034
crates/ruff_linter/src/rules/ruff/rules/useless_if_else.rs:37
↓ 1 callers
Function
useless_import_alias
PLC0414
crates/ruff_linter/src/rules/pylint/rules/useless_import_alias.rs:72
↓ 1 callers
Function
useless_import_from_alias
PLC0414
crates/ruff_linter/src/rules/pylint/rules/useless_import_alias.rs:106
↓ 1 callers
Function
useless_metaclass_type
UP001
crates/ruff_linter/src/rules/pyupgrade/rules/useless_metaclass_type.rs:48
↓ 1 callers
Function
useless_object_inheritance
UP004
crates/ruff_linter/src/rules/pyupgrade/rules/useless_object_inheritance.rs:54
↓ 1 callers
Function
useless_return
PLR1711
crates/ruff_linter/src/rules/pylint/rules/useless_return.rs:54
↓ 1 callers
Function
useless_try_except
TRY203 (previously TRY302)
crates/ruff_linter/src/rules/tryceratops/rules/useless_try_except.rs:44
↓ 1 callers
Function
useless_with_lock
PLW2101
crates/ruff_linter/src/rules/pylint/rules/useless_with_lock.rs:63
↓ 1 callers
Method
user_config_directory
(&self)
crates/ty_test/src/db.rs:574
↓ 1 callers
Method
user_symbol
(self)
crates/ruff_linter/src/rules/refurb/rules/subclass_builtin.rs:152
↓ 1 callers
Function
uses_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 callers
Method
uv_diagnostic
(&self, db: &dyn Db)
crates/ty_project/src/metadata.rs:450
↓ 1 callers
Method
uv_environments_changed
( &mut self, client: &Client, project_root: &SystemPath, changes: UvSyncChange
crates/ty_server/src/session.rs:313
↓ 1 callers
Function
uv_error_summary
(stderr: &str)
crates/ty_project/src/uv/metadata.rs:206
↓ 1 callers
Method
uv_override
Returns the uv mode that overrides editor, project, and script settings. Untrusted workspaces always force [`UseUv::Off`]. In a trusted workspace, thi
crates/ty_server/src/session/options.rs:105
↓ 1 callers
Method
uv_sync_wakeups
Returns each project's background uv synchronization wakeups.
crates/ty_server/src/session.rs:275
↓ 1 callers
Method
valid_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:1476
↓ 1 callers
Function
validate
(self, value)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM222.py:17
↓ 1 callers
Method
validate
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 callers
Method
validate_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 callers
Method
validate_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
↓ 1 callers
Method
validate_attribute_deletion
( &mut self, target: &ast::ExprAttribute, object_ty: Type<'db>, attribute: &st
crates/ty_python_semantic/src/types/infer/builder.rs:3160
↓ 1 callers
Method
validate_brand
Validate length based on BIN for major brands: https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN)
crates/ruff_benchmark/resources/pydantic/types.py:634
↓ 1 callers
Method
validate_completions
Validates that completions for each symbol match the expectations of the fixture. For instance, a bug could cause us to consult a stale cache after m
crates/ruff_benchmark/benches/ty_ide.rs:429
↓ 1 callers
Method
validate_composite_final_assignment
( &mut self, object_ty: Type<'db>, emit_diagnostics: bool, )
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:531
↓ 1 callers
Method
validate_constructor
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:11697
← previous
next →
14,001–14,100 of 31,766, ranked by callers