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
↓ 2 callers
Method
snapshot_enclosing_state
( &mut self, enclosing_place: ScopedPlaceId, enclosing_place_expr: PlaceExprRef,
crates/ty_python_core/src/use_def.rs:3066
↓ 2 callers
Function
snapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_formatter/tests/fixtures.rs:31
↓ 2 callers
Function
snapshot_input_file_for_test
(root: &str, test_name: &str)
crates/ruff_python_parser/tests/fixtures.rs:50
↓ 2 callers
Method
snippets
(self, snippets: bool)
crates/ty_ide/src/completion.rs:145
↓ 2 callers
Method
solve_pending_projection
Shares recovery and normalization between streaming merged projection and correlated solution collection. The projection decides which solved evidence
crates/ty_python_semantic/src/types/generics.rs:3094
↓ 2 callers
Function
some_func
( unformatted, args )
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtskip8.py:2
↓ 2 callers
Function
sort_single_line_elements_sequence
Create a string representing a fixed-up single-line definition of `__all__` or `__slots__` (etc.), that can be inserted into the source code as a `ran
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:220
↓ 2 callers
Function
sort_workspace_report_items
(items: &mut [WorkspaceDocumentDiagnosticReport])
crates/ty_server/tests/e2e/pull_diagnostics.rs:1167
↓ 2 callers
Method
source
Return the [`SourceValue`] of the cell.
crates/ruff_notebook/src/cell.rs:25
↓ 2 callers
Method
source_edit
Constructs a source edit, such as replacing the imported name `old` with `new`.
crates/ty_ide/src/will_rename.rs:419
↓ 2 callers
Function
source_location_to_position
(location: &SourceLocation)
crates/ruff_server/src/edit/range.rs:119
↓ 2 callers
Method
source_map
Returns the map from extracted TOML offsets to their original script offsets.
crates/ruff_python_ast/src/script.rs:31
↓ 2 callers
Method
source_name
(&self)
crates/ruff_python_semantic/src/binding.rs:767
↓ 2 callers
Method
source_node
Returns the source expression for this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3485
↓ 2 callers
Method
source_order_data
(&self, source_order: SourceOrderId)
crates/ty_python_semantic/src/types/constraints.rs:1564
↓ 2 callers
Method
source_parameter_index
Returns the original source parameter's position before variadic expansion.
crates/ty_python_semantic/src/types/signatures.rs:6216
↓ 2 callers
Method
source_place
Separately parsed annotations and synthetic references resolve from their syntax.
crates/ty_python_semantic/src/types/infer/builder.rs:10889
↓ 2 callers
Method
source_text
(&self)
crates/ty_python_core/src/builder.rs:3482
↓ 2 callers
Method
source_tokens
Returns the [`Tokens`] for the parsed source file. Unlike [`Self::tokens`], this method always returns the tokens for the current file, even when wi
crates/ruff_linter/src/checkers/ast/mod.rs:512
↓ 2 callers
Method
source_type_for_format
Get the source type for formatter-oriented operations.
crates/ruff_server/src/session/index.rs:602
↓ 2 callers
Method
source_types_mut
(&mut self)
crates/ty_python_semantic/src/types/call/arguments.rs:115
↓ 2 callers
Function
span_to_location
(span: &Span, context: &LspDiagnosticContext)
crates/ruff_server/src/lint.rs:546
↓ 2 callers
Method
spec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/named_tuple.rs:448
↓ 2 callers
Function
special_member_for_enum_complement
Return a precise enum-owned `.name`/`.value` attribute for a complement when possible. If a complement carries dynamic rest components, expanding it
crates/ty_python_semantic/src/types/enums.rs:457
↓ 2 callers
Function
specialization_argument_is_static
Check only closed, directly inspectable types. Recursive substitutions may additionally use the protocol's own parameters, whose bounds and defaults a
crates/ty_python_semantic/src/types/instance.rs:799
↓ 2 callers
Method
specialization_or_default
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:767
↓ 2 callers
Method
specialize_for_bound_receiver
Specializes this signature using the type variables determined by its bound receiver. Matching the receiver can constrain type variables that occur e
crates/ty_python_semantic/src/types/signatures.rs:1713
↓ 2 callers
Function
specialize_generic_class_from_solutions
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, target_class: ClassLiteral<'db>, solutions:
crates/ty_python_semantic/src/types/narrow.rs:1049
↓ 2 callers
Method
specialized_value_type
Resolve this specialization while preserving the marker of an unguarded cycle.
crates/ty_python_semantic/src/types/type_alias.rs:593
↓ 2 callers
Method
specificity
(&self)
crates/ruff_linter/src/rule_selector.rs:413
↓ 2 callers
Function
split
(s: &'a str, splitters: &'b [u8])
crates/ruff_unicode_names2_generator/src/util.rs:16
↓ 2 callers
Method
split_by_extra_paths
Splits the indexed stub package paths into extra paths and remaining paths. The first-phase stub override search uses the extra paths. The second pha
crates/ty_module_resolver/src/resolve.rs:521
↓ 2 callers
Function
split_names
(names: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:154
↓ 2 callers
Method
stack
(&self)
crates/ruff_formatter/src/printer/call_stack.rs:207
↓ 2 callers
Method
stack_mut
(&mut self)
crates/ruff_formatter/src/printer/call_stack.rs:211
↓ 2 callers
Method
stack_size
(self, size: usize)
crates/ruff_server/src/server/schedule/thread.rs:55
↓ 2 callers
Method
standalone_expression_type
Infer the type of a standalone expression. # Panics This function panics if `expr` was not marked as a standalone expression during semantic indexin
crates/ty_python_semantic/src/dunder_all.rs:185
↓ 2 callers
Function
starred_assignment_element
( context: &InferContext<'db, '_>, definition_kind: &DefinitionKind<'db>, target_type: Type<'db>,
crates/ty_python_semantic/src/types/diagnostic.rs:2168
↓ 2 callers
Function
starred_sequence_pattern_type
Build the structural type used for a sequence pattern containing `*rest`. Fixed prefix elements use non-negative indices and fixed suffix elements us
crates/ty_python_semantic/src/types/match_pattern.rs:283
↓ 2 callers
Method
start
(&self, action: &str, target: impl Display)
crates/ty/src/lib.rs:863
↓ 2 callers
Function
start_of_block
()
crates/ruff_python_importer/src/insertion.rs:569
↓ 2 callers
Function
starts_container_block
Returns whether `line` starts a block that owns its indented contents.
crates/ty_ide/src/docstring/document/syntax.rs:480
↓ 2 callers
Function
starts_suppression
Returns `true` if the statements coming after `leading_or_trailing_comments` are suppressed. The result is only correct if called for statement comme
crates/ruff_python_formatter/src/verbatim.rs:27
↓ 2 callers
Method
state
(&self)
crates/ruff_formatter/src/formatter.rs:237
↓ 2 callers
Method
state
(self)
crates/ty_python_core/src/use_def.rs:747
↓ 2 callers
Method
state_mut
(&mut self)
crates/ruff_formatter/src/formatter.rs:241
↓ 2 callers
Function
statement_deletion_range
Finds the range necessary to delete a statement (including any semicolons around it). Returns the range and whether there were multiple statements on
crates/ruff_linter/src/rules/perflint/helpers.rs:61
↓ 2 callers
Function
static_dunder_all
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_core/src/static_dunder_all.rs:46
↓ 2 callers
Function
static_member_type_for_attribute
Returns the descriptor object type for an attribute expression `x.y`, without invoking the descriptor protocol. This corresponds to `inspect.getattr_s
crates/ty_python_semantic/src/types/ide_support.rs:491
↓ 2 callers
Function
statically_known_parametrize_names
Returns statically known pytest parametrization names from a string or fixed-length iterable.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1469
↓ 2 callers
Method
stdlib
(&self, mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:946
↓ 2 callers
Function
stdlib_path_to_module_name
(relative_path: &Utf8Path)
crates/ty_module_resolver/src/path.rs:513
↓ 2 callers
Method
stdout_general
Return the [`Stdout`] stream for general messages. The returned stream will be disabled when [`VerbosityLevel::Quiet`] is used.
crates/ty/src/printer.rs:58
↓ 2 callers
Method
stdout_important
Return the [`Stdout`] stream for important messages. Unlike [`Self::stdout_general`], the returned stream will be enabled when [`VerbosityLevel::Quie
crates/ty/src/printer.rs:44
↓ 2 callers
Method
stmts
Returns the statements comprising the basic block at the given index
crates/ruff_python_semantic/src/cfg/graph.rs:41
↓ 2 callers
Method
stop
(self)
crates/ty/src/lib.rs:930
↓ 2 callers
Method
stop
(self)
crates/ruff_formatter/src/buffer.rs:682
↓ 2 callers
Method
str
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:10781
↓ 2 callers
Method
stream_for_requested_summary
Return the [`Stdout`] stream for a summary message that was explicitly requested by the user. For example, in `ty version` the user has requested the
crates/ty/src/printer.rs:76
↓ 2 callers
Function
string_literal_values
Given a string literal or a union of string literals, return an iterator over the contained strings, or `None` if the type is neither.
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:47
↓ 2 callers
Function
stringify
(settings: Settings)
playground/ruff/src/Editor/settings.ts:9
↓ 2 callers
Function
stub_file_to_real_module
Resolves the runtime module corresponding to a stub file. Modules that are only available as stubs, including built-in modules, return `None`.
crates/ty_module_resolver/src/resolve.rs:378
↓ 2 callers
Method
stub_placeholder_binding_type
(&self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:3565
↓ 2 callers
Function
sub_ast_level
sub-AST level is stored in the top two bits
crates/ruff_python_ast/src/node_index.rs:100
↓ 2 callers
Method
sub_diagnostics_mut
Returns a mutable borrow of the sub-diagnostics of this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:372
↓ 2 callers
Method
submodule_completions
Returns completions for submodules of the given module.
crates/ty_python_semantic/src/semantic_model.rs:282
↓ 2 callers
Method
substitute_one_typevar
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, bound_typevar: BoundTy
crates/ty_python_semantic/src/types/generics.rs:2442
↓ 2 callers
Method
successful_sequence_pattern_type
( &self, kind: &SequencePatternPredicateKind<'db>, matched_element_types: &[Type<'db>]
crates/ty_python_semantic/src/types/narrow.rs:3229
↓ 2 callers
Method
successful_sequence_subject_type
Return the type established while a sequence pattern is being evaluated. Exact tuples can refine their tuple element types with the facts established
crates/ty_python_semantic/src/types/narrow.rs:3167
↓ 2 callers
Method
suggestion
(&self)
crates/ruff_linter/src/rules/refurb/rules/check_and_remove_from_set.rs:51
↓ 2 callers
Method
suggestion
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:56
↓ 2 callers
Method
summary
(&self)
crates/ty_python_semantic/src/lint.rs:98
↓ 2 callers
Method
supports_diagnostic_dynamic_registration
Returns `true` if the client supports dynamic registration for diagnostic capabilities.
crates/ty_server/src/capabilities.rs:182
↓ 2 callers
Method
supports_full_diagnostic_output
Returns `true` if the client supports opening fully rendered diagnostics.
crates/ty_server/src/capabilities.rs:192
↓ 2 callers
Method
supports_multiline_semantic_tokens
Returns `true` if the client supports multiline semantic tokens.
crates/ty_server/src/capabilities.rs:144
↓ 2 callers
Method
supports_overload_aggregation
Aggregation compares parameter and return types. A receiver constraint imposes an additional obligation, and a `ParamSpec` value has no meaningful ret
crates/ty_python_semantic/src/types/signatures.rs:1373
↓ 2 callers
Method
supports_pull_diagnostics
Returns `true` if the client supports pull diagnostics.
crates/ty_server/src/capabilities.rs:114
↓ 2 callers
Method
supports_self_binding
Returns `true` if this type supports eager `Self` binding via `bind_self_typevars`. `FunctionLiteral`, `BoundMethod`, and function-like `Callable` ty
crates/ty_python_semantic/src/types.rs:2598
↓ 2 callers
Method
supports_work_done_progress
Returns `true` if the client supports work done progress.
crates/ty_server/src/capabilities.rs:164
↓ 2 callers
Function
suppress_all_diagnostics
Adds suppressions to all lint diagnostics and writes the changed files back to disk. Returns how many diagnostics were suppressed along the remaining
crates/ty_python_semantic/src/fixes.rs:40
↓ 2 callers
Method
suppress_diagnostics
Prevents diagnostic construction for this inference context.
crates/ty_python_semantic/src/types/context.rs:282
↓ 2 callers
Method
suppress_errors_for_no_type_check
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:818
↓ 2 callers
Function
suppression_range
Returns the suppression range for the given `range`. The suppression range is defined as: `start`: The `end` of the preceding `Newline` or `NonLogic
crates/ty_python_semantic/src/suppression/add_ignore.rs:196
↓ 2 callers
Function
symbol
( db: &'db dyn Db, scope: ScopeId<'db>, name: &str, considered_definitions: ConsideredDefiniti
crates/ty_python_semantic/src/place.rs:473
↓ 2 callers
Method
symbol_binding_definition_ids
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:2987
↓ 2 callers
Method
symbol_has_scope_declaration
( self, file_scope: FileScopeId, place_expr: PlaceExprRef, )
crates/ty_python_semantic/src/place_load.rs:1164
↓ 2 callers
Method
symbol_id
(&self)
crates/ty_python_core/src/definition.rs:1253
↓ 2 callers
Method
symbol_is_global_in_scope
(&self, symbol: ScopedSymbolId, scope: FileScopeId)
crates/ty_python_core/src/lib.rs:501
↓ 2 callers
Method
symbol_live_binding_status
Returns the current boundness of `symbol` after applying pending reachability constraints. Bindings on statically unreachable paths do not contribute
crates/ty_python_core/src/use_def.rs:3003
↓ 2 callers
Method
symbol_name
Returns the left most part of the member expression, e.g. `x` in `x.y.z`. This is the symbol on which the member access is performed.
crates/ty_python_core/src/member.rs:193
↓ 2 callers
Function
symbol_params
(uri: Uri)
crates/ty_server/tests/e2e/closed_documents.rs:356
↓ 2 callers
Method
symbol_resolves_to_global_scope
Returns `true` if the given symbol in the given scope resolves to the global scope, either because: 1. The given scope *is* the global scope. 2. The
crates/ty_python_core/src/lib.rs:516
↓ 2 callers
Function
symbols_for_file
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_ide/src/symbols.rs:395
↓ 2 callers
Method
sync
Syncs the [`File`]'s state with the state of the file on the system.
crates/ruff_db/src/files.rs:480
↓ 2 callers
Method
syncOptions
()
playground/ty/src/Playground.tsx:734
↓ 2 callers
Method
sync_workspace
(&self)
crates/ty_project/src/uv/environments.rs:1253
↓ 2 callers
Function
synchronize_scripts
(case: &mut TestCase, scripts: &[File])
crates/ty/tests/file_watching.rs:4535
↓ 2 callers
Method
synchronize_scripts
(&mut self, db: &mut ProjectDatabase, scripts: &[File])
crates/ty/src/lib.rs:631
↓ 2 callers
Method
syntax_error
(&self, kind: ParseErrorKind)
crates/ty_python_semantic/src/suppression/parser.rs:148
↓ 2 callers
Function
synthesize_namedtuple_class_member
Synthesize a namedtuple class member given the field information. This is used by both `DynamicNamedTupleLiteral` and `StaticClassLiteral` (for decla
crates/ty_python_semantic/src/types/class/named_tuple.rs:30
← previous
next →
7,001–7,100 of 31,562, ranked by callers