Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 4 callers
Method
quote_style
(&self, flags: impl StringFlags)
crates/ruff_python_codegen/src/generator.rs:82
↓ 4 callers
Method
range
Range of the input source file covered by this formatted code, or None if the entire file is covered in this instance
crates/ruff_formatter/src/lib.rs:390
↓ 4 callers
Method
range
(&self)
crates/ruff_linter/src/suppression.rs:90
↓ 4 callers
Method
range
(&self)
crates/ruff_linter/src/rules/refurb/helpers.rs:171
↓ 4 callers
Method
range_relative
Returns the range of this section relative to [`Docstring::body`]
crates/ruff_linter/src/docstrings/sections.rs:364
↓ 4 callers
Method
reachable_member_declarations
( &self, member: ScopedMemberId, )
crates/ty_python_core/src/use_def.rs:1383
↓ 4 callers
Method
read_directory
( &'a self, path: &SystemPath, )
crates/ty_server/src/system.rs:269
↓ 4 callers
Method
read_error
Returns `true` if there was an error when reading the content of the file.
crates/ruff_db/src/source.rs:112
↓ 4 callers
Method
read_to_string
Reads the content of the file into a [`String`]. Reading the same file multiple times isn't guaranteed to return the same content. It's possible that
crates/ruff_db/src/files.rs:407
↓ 4 callers
Method
receive
Receive a message from the server. It will wait for `timeout` duration for a message to arrive. If no message is received within that time, it will r
crates/ty_server/tests/e2e/main.rs:723
↓ 4 callers
Method
receive
Receive a message from the server. It will wait for `timeout` duration for a message to arrive. If no message is received within that time, it will r
crates/ruff_server/tests/e2e/main.rs:589
↓ 4 callers
Method
receiver_constraint_types
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2169
↓ 4 callers
Method
record
(_visit: &mut dyn Visit)
crates/ruff_workspace/src/options.rs:646
↓ 4 callers
Method
record_binding
Record a newly-encountered binding for this place.
crates/ty_python_core/src/use_def/place_state.rs:450
↓ 4 callers
Method
record_binding_change
(&mut self)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:45
↓ 4 callers
Method
record_exception_checkpoint
Records the current flow state immediately before an operation that may raise an exception. This models exceptions from ordinary operations, not ever
crates/ty_python_core/src/builder.rs:2468
↓ 4 callers
Method
record_reachability_constraint
( &mut self, reachability_constraint: ScopedReachabilityConstraintId, )
crates/ty_python_core/src/use_def.rs:2744
↓ 4 callers
Method
record_reachability_constraint_id
Similar to [`Self::record_reachability_constraint`], but takes a [`ScopedPredicateId`].
crates/ty_python_core/src/builder.rs:2608
↓ 4 callers
Method
recursive_type_normalized_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, div: Type<'db>,
crates/ty_python_semantic/src/types.rs:1865
↓ 4 callers
Method
references
(&self)
crates/ty_ide/src/find_references.rs:128
↓ 4 callers
Method
remove
(self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:24
↓ 4 callers
Method
remove_redundant_entries
Two disjoint bases are allowed to coexist in an MRO if one is a subclass of the other. This method therefore removes any entry in `self` that is a sup
crates/ty_python_semantic/src/types/diagnostic.rs:3687
↓ 4 callers
Method
rename
Rename a symbol (from `name` to `target`). ## How it works The renaming algorithm is as follows: 1. Determine the scope in which the rename should
crates/ruff_linter/src/renamer.rs:112
↓ 4 callers
Method
render
Render the given diagnostic into a `String`. (This will set the "printed" flag on `Diagnostic`.)
crates/ruff_db/src/diagnostic/render.rs:2678
↓ 4 callers
Function
render_into
Renders normalized docstring source as Markdown. Outside recognized code blocks, leading indentation is encoded as non-breaking spaces. This preserve
crates/ty_ide/src/docstring/markdown/general.rs:26
↓ 4 callers
Function
render_parameter_docstring
(description: &str, following_prose: &str)
crates/ty_ide/src/docstring/markdown/structured.rs:1068
↓ 4 callers
Function
render_sections
(raw: &str, sections: Vec<Section>)
crates/ty_ide/src/docstring/markdown/structured.rs:1094
↓ 4 callers
Function
render_sections_into
Renders a docstring from non-overlapping structured sections and general source fragments.
crates/ty_ide/src/docstring/markdown/structured.rs:30
↓ 4 callers
Method
repeat_specialization
Returns a specialization of this generic context where each typevar is mapped to the same type.
crates/ty_python_semantic/src/types/generics.rs:951
↓ 4 callers
Function
report_conflicting_metaclass_from_bases
Emit a diagnostic for a metaclass conflict where both conflicting metaclasses are inherited from base classes.
crates/ty_python_semantic/src/types/diagnostic.rs:3624
↓ 4 callers
Method
report_diagnostics_with_override
( &self, context: &InferContext<'db, '_>, node: ast::AnyNodeRef, overrides: &C
crates/ty_python_semantic/src/types/call.rs:436
↓ 4 callers
Function
report_instance_layout_conflict
( context: &InferContext, header_range: TextRange, base_nodes: Option<&[ast::Expr]>, disjoint_
crates/ty_python_semantic/src/types/diagnostic.rs:3529
↓ 4 callers
Method
report_progress
(&self, progress: &LazyWorkDoneProgress)
crates/ty_server/src/server/script_progress.rs:98
↓ 4 callers
Method
request_project_sync
Requests fresh workspace metadata for project rediscovery.
crates/ty_project/src/uv/environments.rs:126
↓ 4 callers
Method
request_queue
(&self)
crates/ty_server/src/session.rs:217
↓ 4 callers
Function
resolve_scoped_settings
Extract the project root (scope) and [`Settings`] from a given `pyproject.toml`.
crates/ruff_workspace/src/resolver.rs:427
↓ 4 callers
Function
resolver_environment
(db: &dyn Db)
crates/ty_ide/src/will_rename.rs:1110
↓ 4 callers
Function
result
(diff: Diff, *, error: str | None = None)
python/ruff-ecosystem/tests/test_html.py:34
↓ 4 callers
Method
resume_suspended_workspace_diagnostic_request
Resumes (retries) the workspace diagnostic request if there were any changes to the [`Session`] (the revision got bumped) since the workspace diagnost
crates/ty_server/src/session.rs:261
↓ 4 callers
Function
return_type
()
crates/ty_python_semantic/src/fixes.rs:1079
↓ 4 callers
Method
rule
(&self)
crates/ruff_formatter/src/lib.rs:718
↓ 4 callers
Method
rule_selection
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:191
↓ 4 callers
Function
run
Run `path` as a markdown test suite with given `title`. Panic on test failure, and print failure details.
crates/ty_test/src/lib.rs:44
↓ 4 callers
Method
run
(self)
crates/ty_project/src/uv/service.rs:281
↓ 4 callers
Function
run_uv_with_system
Runs uv in `directory` with the system's configured executable and environment. Returns an error if uv fails.
crates/ty/tests/file_watching.rs:4407
↓ 4 callers
Function
same_enum_or_pattern_type
Return the exact set of values matched within the subject's enum by an OR of member patterns.
crates/ty_python_semantic/src/types/match_pattern.rs:962
↓ 4 callers
Method
satisfies
( &self, db: &dyn Db, importing_file: ImportingFile<'_>, request: &ImportReque
crates/ty_python_semantic/src/importer.rs:594
↓ 4 callers
Method
scope
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/infer.rs:1002
↓ 4 callers
Method
scope
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:148
↓ 4 callers
Method
search_paths
(self, db: &'db dyn Db)
crates/ty_python_core/src/program.rs:47
↓ 4 callers
Method
second
(&self)
crates/ruff_linter/src/suppression.rs:194
↓ 4 callers
Method
second_operand
Returns the right operand of the first comparison (`b` in `a < b <= c`). # Panics Panics if there are fewer than two operands. See [`Self::first_ope
crates/ruff_python_ast/src/nodes.rs:123
↓ 4 callers
Function
secondaryAnnotationsWithMessages
(annotations: readonly T[])
playground/shared/src/diagnostics.ts:1
↓ 4 callers
Method
secondary_annotation
Add a secondary annotation with the given message and range.
crates/ruff_linter/src/checkers/ast/mod.rs:3938
↓ 4 callers
Method
secondary_annotation_without_message
Add a secondary annotation without a message at the given range.
crates/ruff_linter/src/checkers/ast/mod.rs:3954
↓ 4 callers
Method
secondary_annotations
Returns all annotations, skipping the first primary annotation.
crates/ruff_db/src/diagnostic/mod.rs:363
↓ 4 callers
Function
sections
Returns recognized Google-style sections in source order. `source` must have already undergone PEP-257 trimming and universal newline normalization (
crates/ty_ide/src/docstring/document/google.rs:72
↓ 4 callers
Method
select
Waits for a main-loop action, project wakeup, or client message, in that order. Polling uv can wait for worker database snapshots, so drain the bounde
crates/ty_server/src/server/main_loop.rs:259
↓ 4 callers
Function
select_preferred_suppression
Selects between applicable suppressions yielded in reverse source order. Candidates covering the same endpoint are nested, so the first (innermost) c
crates/ty_python_semantic/src/suppression.rs:455
↓ 4 callers
Function
semantic_tokens
Generates semantic tokens for a Python file within the specified range. Pass None to get tokens for the entire file.
crates/ty_ide/src/semantic_tokens.rs:196
↓ 4 callers
Method
semantic_tokens_full_request
(&mut self, uri: &Uri)
crates/ty_server/tests/e2e/main.rs:1175
↓ 4 callers
Method
sequence
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/arguments.rs:200
↓ 4 callers
Function
sequence_elts
Extract the element slice from a list or tuple expression.
crates/ty_python_semantic/src/types/unpacker.rs:720
↓ 4 callers
Method
set_documentation_url
(&mut self, url: Option<String>)
crates/ruff_db/src/diagnostic/mod.rs:417
↓ 4 callers
Method
set_node_level
(&mut self, level: NodeLevel)
crates/ruff_python_formatter/src/context.rs:61
↓ 4 callers
Method
set_noqa_offset
Set the remapped offset for a suppression comment.
crates/ruff_db/src/diagnostic/mod.rs:442
↓ 4 callers
Method
set_open_files
(self, db: &mut dyn Db, open_files: FxHashSet<File>)
crates/ty_project/src/lib.rs:662
↓ 4 callers
Method
set_style
Set `style` for `line`, `col` if: 1. That line and column exist in `StyledBuffer` 2. `overwrite` is `true` or existing style is `Style::NoStyle` or `S
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:158
↓ 4 callers
Method
settings
(&self)
crates/ty_server/src/session.rs:1839
↓ 4 callers
Function
setup_uv_with
Like [`setup_uv`], but calls `prepare` after writing the files and before running uv.
crates/ty/tests/file_watching.rs:4430
↓ 4 callers
Method
shadowed_binding
Returns the ID of the binding that the given binding shadows, if any.
crates/ruff_python_semantic/src/scope.rs:125
↓ 4 callers
Method
shadowed_id
(&self)
crates/ruff_python_semantic/src/model.rs:2566
↓ 4 callers
Function
shutdown_and_await_workspace_diagnostic
( mut server: TestServer, request_id: &RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1561
↓ 4 callers
Method
signature
(&self)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:80
↓ 4 callers
Function
signature_help
Signature help information for function calls at the given position
crates/ty_ide/src/signature_help.rs:79
↓ 4 callers
Method
signature_with_inferred_return_type
The signature of this function, with the return type possibly inferred from the body. TODO: We should rename this function to `signature` and use it
crates/ty_python_semantic/src/types/function.rs:1771
↓ 4 callers
Method
singleline
(&self)
crates/ty_python_semantic/src/types/display.rs:175
↓ 4 callers
Method
skip_bytes
(&mut self, bytes: usize)
crates/ruff_python_parser/src/string.rs:113
↓ 4 callers
Method
solve
( &self, constraints: &ConstraintSetBuilder<'db>, builder: &mut SpecializationBuilder<
crates/ty_python_semantic/src/types/call/bind.rs:7099
↓ 4 callers
Method
solve_pending_with
Solves the call once, retaining correlated alternatives and deriving their compatibility projection from the same bindings.
crates/ty_python_semantic/src/types/generics.rs:2989
↓ 4 callers
Method
solve_with
Solves each path by applying a per-typevar solver function, collecting retained solutions. A genuinely unsolved variable does not invalidate a path.
crates/ty_python_semantic/src/types/constraints.rs:4101
↓ 4 callers
Method
some_method
()
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001.py:10
↓ 4 callers
Function
something
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py:53
↓ 4 callers
Function
sort_dunder_all
RUF022 Sort a tuple or list that defines or mutates the global variable `__all__`. This routine checks whether the tuple or list is sorted, and emits
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_all.rs:176
↓ 4 callers
Method
source_code
(&self)
crates/ruff_formatter/src/lib.rs:247
↓ 4 callers
Method
source_overload_index
Returns this signature's position in its defining function's overload list.
crates/ty_python_semantic/src/types/signatures.rs:2546
↓ 4 callers
Method
source_parameter_index
Locates the source parameter that accepted a forwarded argument. An unpacked variadic annotation can expand one source declaration into several calla
crates/ty_python_semantic/src/types/call/bind.rs:10114
↓ 4 callers
Method
source_range
The range the formatted code corresponds to in the source document.
crates/ruff_formatter/src/lib.rs:558
↓ 4 callers
Method
source_type_for_lint
Get the source type for linter-oriented operations.
crates/ruff_server/src/session/index.rs:589
↓ 4 callers
Method
span
Returns the complete single-backtick span following the role name. For `` :class:`Model <pkg.Model>` ``, this returns the span `` `Model <pkg.Model>`
crates/ty_ide/src/docstring/document/syntax.rs:196
↓ 4 callers
Method
span_to_locations
(&self, span: Range<usize>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:64
↓ 4 callers
Method
specialization_error
Reports why a type variable's declared bound or constraints cannot be satisfied. Paths whose lower bounds violate the same declared upper bound in a
crates/ty_python_semantic/src/types/generics.rs:2714
↓ 4 callers
Method
specialize_self_domain
(self)
crates/ty_python_semantic/src/types/generics.rs:2328
↓ 4 callers
Method
src_text
(&self, ranged: T)
crates/ruff_python_parser/src/parser/mod.rs:677
↓ 4 callers
Method
start_watching
Starts file-watching and waits until the watcher is ready to deliver events. Panics if the test is already watching.
crates/ty/tests/file_watching.rs:79
↓ 4 callers
Method
statements
Returns an [`Iterator`] over the statements, starting from the given [`NodeId`]. through to any parents.
crates/ruff_python_semantic/src/model.rs:1632
↓ 4 callers
Function
str_width
(s: &str)
crates/ruff_annotate_snippets/src/renderer/render.rs:2397
↓ 4 callers
Method
sub_diagnostics
(&self)
crates/ruff_db/src/diagnostic/mod.rs:367
↓ 4 callers
Method
supports_arbitrary_key_deletion
Returns whether operations that delete an arbitrary key are safe. Operations such as `clear()` and `popitem()` require a closed `TypedDict` or mutabl
crates/ty_python_semantic/src/types/typed_dict.rs:488
↓ 4 callers
Method
supports_workspace_diagnostic_refresh
Returns `true` if the client supports workspace diagnostic refresh.
crates/ty_server/src/capabilities.rs:94
← previous
next →
3,501–3,600 of 31,562, ranked by callers