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
↓ 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:844
↓ 2 callers
Method
specialization_or_default
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:770
↓ 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:1690
↓ 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:1051
↓ 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:596
↓ 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:566
↓ 2 callers
Function
split_names
(names: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:151
↓ 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:2220
↓ 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:903
↓ 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
static_string_sequence_for_definition
Returns the statically known string sequence assigned by `definition`.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1778
↓ 2 callers
Function
static_string_sequence_for_module_symbol
Returns the statically known string sequence bound to a module symbol. For example, given pytest-style plugin registration: ```py essential_plugins
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1768
↓ 2 callers
Function
static_string_sequence_from_expression
Evaluates a static string sequence while preserving the order of tuple concatenation. Some supported pytest releases use tuple concatenation to defin
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1808
↓ 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:1732
↓ 2 callers
Method
stdlib
(&self, mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:991
↓ 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:55
↓ 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:41
↓ 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:970
↓ 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:10841
↓ 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:73
↓ 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:46
↓ 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:423
↓ 2 callers
Method
stub_placeholder_binding_type
(&self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:3610
↓ 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:2466
↓ 2 callers
Method
successful_sequence_pattern_type
( &self, kind: &SequencePatternPredicateKind<'db>, matched_element_types: &[Type<'db>]
crates/ty_python_semantic/src/types/narrow.rs:3231
↓ 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:3169
↓ 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:1346
↓ 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_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_errors_for_no_type_check
( &mut self, definition: Definition<'db>, function: &ast::StmtFunctionDef, )
crates/ty_python_semantic/src/types/infer/builder/function.rs:816
↓ 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:477
↓ 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:1480
↓ 2 callers
Function
synchronize_scripts
(case: &mut TestCase, scripts: &[File])
crates/ty/tests/file_watching.rs:4543
↓ 2 callers
Method
synchronize_scripts
(&mut self, db: &mut ProjectDatabase, scripts: &[File])
crates/ty/src/lib.rs:658
↓ 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
↓ 2 callers
Function
synthesize_typed_dict_no_argument_method
( db: &'db dyn Db, typed_dict: TypedDictType<'db>, return_ty: Type<'db>, )
crates/ty_python_semantic/src/types/class/typed_dict.rs:716
↓ 2 callers
Method
system_mut
Returns a mutable reference to the system. WARNING: Triggers a new revision, canceling other database handles. This can lead to deadlock.
crates/ty_project/src/db.rs:279
↓ 2 callers
Method
system_path
(&self)
crates/ty_project/src/watch.rs:106
↓ 2 callers
Function
tab_offset_u32
Returns the number of columns from `column` to the next tab stop using `u32` values.
crates/ruff_python_trivia/src/whitespace.rs:44
↓ 2 callers
Method
take_condition_flow_snapshots
Takes specialized truthy/falsy flow states for condition expressions whose evaluation can leave different bindings behind depending on the condition o
crates/ty_python_core/src/builder.rs:1335
↓ 2 callers
Method
take_exception_snapshots
Takes the current context's snapshots and updates the number of active handlers.
crates/ty_python_core/src/builder/except_handlers.rs:208
↓ 2 callers
Method
take_open_files
This takes the open files from the project and returns them.
crates/ty_project/src/lib.rs:687
↓ 2 callers
Function
target_length
(targets: &[ast::Expr])
crates/ty_python_semantic/src/types/unpacker.rs:546
↓ 2 callers
Method
target_mask
Returns the conservative bit used to skip subtrees without this target. Lints are hashed into 62 buckets, with one bucket reserved for blanket suppre
crates/ty_python_semantic/src/suppression.rs:610
↓ 2 callers
Method
target_scope
Returns the scope where the unpack target expression belongs to.
crates/ty_python_core/src/unpack.rs:74
↓ 2 callers
Method
target_version
(&self)
crates/ruff_python_parser/src/parser/options.rs:38
↓ 2 callers
Method
tearDown
(self)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N802.py:37
↓ 2 callers
Method
terminal
(&self)
crates/ty_project/src/metadata/settings.rs:61
↓ 2 callers
Method
terminal
Index of terminal block
crates/ruff_python_semantic/src/cfg/graph.rs:31
↓ 2 callers
Function
test_invalid_syntax
Assert that the parser generates at least one syntax error for the given input file. Snapshots the AST and the error messages.
crates/ruff_python_parser/tests/fixtures.rs:158
↓ 2 callers
Function
test_valid_syntax
Asserts that the parser generates no syntax errors for a valid program. Snapshots the AST.
crates/ruff_python_parser/tests/fixtures.rs:60
↓ 2 callers
Method
text
(&self)
crates/ty_ide/src/inlay_hints.rs:322
↓ 2 callers
Method
text_after
(&self, token: &'a LogicalLineToken)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:176
↓ 2 callers
Function
text_document_fixes
( query: &DocumentQuery, source: &str, modified: &str, encoding: PositionEncoding, )
crates/ruff_server/src/fix.rs:177
↓ 2 callers
Function
text_ends_at_quote
Returns `true` if the [`TextRange`] ends at a quote character.
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:250
↓ 2 callers
Function
text_size_to_lsp_position
( offset: TextSize, text: &str, index: &LineIndex, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:250
← previous
next →
7,101–7,200 of 31,766, ranked by callers