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
↓ 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.
crates/ty_server/src/server/main_loop.rs:333
↓ 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:213
↓ 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:672
↓ 4 callers
Function
set_search_paths
(db: &mut TestDb, search_paths: &SearchPathSettings)
crates/ty_ide/src/will_rename.rs:2462
↓ 4 callers
Method
settings
(&self)
crates/ty_server/src/session.rs:1867
↓ 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:4438
↓ 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:2595
↓ 4 callers
Function
shutdown_and_await_workspace_diagnostic
( mut server: TestServer, request_id: &RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1595
↓ 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:7200
↓ 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:3018
↓ 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:4165
↓ 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:2557
↓ 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:10299
↓ 4 callers
Method
source_range
The range the formatted code corresponds to in the source document.
crates/ruff_formatter/src/lib.rs:557
↓ 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:2740
↓ 4 callers
Method
specialize_self_domain
(self)
crates/ty_python_semantic/src/types/generics.rs:2356
↓ 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:80
↓ 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:1661
↓ 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:489
↓ 4 callers
Method
supports_workspace_diagnostic_refresh
Returns `true` if the client supports workspace diagnostic refresh.
crates/ty_server/src/capabilities.rs:94
↓ 4 callers
Method
swap_remove_index
Remove the element at `index` from the collection. The element is removed by swapping it with the last element of the collection and popping it off,
crates/ty_python_semantic/src/types/set_theoretic.rs:923
↓ 4 callers
Function
symbol_impl
Implementation of [`symbol`].
crates/ty_python_semantic/src/place.rs:1548
↓ 4 callers
Function
symbols_for_file_global_only
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_ide/src/symbols.rs:415
↓ 4 callers
Method
sync
Creates a new local task.
crates/ty_server/src/server/schedule/task.rs:86
↓ 4 callers
Method
system
(&self)
crates/ty_python_semantic/src/db.rs:150
↓ 4 callers
Function
system_module_search_paths
Returns an iterator over all search paths pointing to a system path
crates/ty_module_resolver/src/lib.rs:44
↓ 4 callers
Function
system_path_to_directory
( db: &dyn Db, path: impl AsRef<SystemPath>, )
crates/ruff_db/src/files/directory.rs:80
↓ 4 callers
Method
take_thin_vec
(&mut self, mut snapshot: ScratchSnapshot)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:51
↓ 4 callers
Method
target_kind
(&self)
crates/ty_python_core/src/definition.rs:1295
↓ 4 callers
Function
terminal_reachability
(id: ScopedReachabilityConstraintId)
crates/ty_python_semantic/src/reachability.rs:804
↓ 4 callers
Function
test_file
(mock_typeshed: &VendoredFileSystem, path: &VendoredPath)
crates/ruff_db/src/vendored.rs:715
↓ 4 callers
Function
test_nonexistent_path
(path: &str)
crates/ruff_db/src/vendored.rs:683
↓ 4 callers
Method
text
(&self, code: SourceCode<'a>)
crates/ruff_formatter/src/source_code.rs:69
↓ 4 callers
Method
text
(&self, text: &'a str)
crates/ruff_python_formatter/src/comments/mod.rs:177
↓ 4 callers
Method
to_instance_unknown
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/class/known.rs:1282
↓ 4 callers
Method
to_link
( &self, db: &dyn Db, src: Option<FileRange>, encoding: PositionEncoding,
crates/ty_server/src/document/location.rs:27
↓ 4 callers
Method
to_non_generic_instance
Returns a non-generic instance of this class.
crates/ty_python_semantic/src/types/class.rs:1039
↓ 4 callers
Method
to_range
(&self, text: &str, index: &LineIndex, encoding: PositionEncoding)
crates/ruff_server/src/edit/range.rs:67
↓ 4 callers
Method
to_rule_selection
(&self, db: &dyn Db)
crates/ty_project/src/metadata/options.rs:1340
↓ 4 callers
Method
to_search_paths
( &self, context: OptionsContext<'_>, project_name: &str, site_packages_paths:
crates/ty_project/src/metadata/options.rs:422
↓ 4 callers
Method
to_settings
( &self, db: &dyn Db, strategy: &Strategy, )
crates/ty_project/src/metadata.rs:609
↓ 4 callers
Method
to_settings
( &self, db: &dyn Db, context: OptionsContext<'_>, strategy: &Strategy, )
crates/ty_project/src/metadata/options.rs:550
↓ 4 callers
Method
to_string_parts
(&self)
crates/ty_python_semantic/src/types/display.rs:804
↓ 4 callers
Method
to_system_path
(&self)
crates/ty_module_resolver/src/path.rs:141
↓ 4 callers
Method
token_range
Return the range of the token at the given offset. Returns an empty range at the given offset if there's no token at the offset, or if the offset is
crates/ruff_python_ast/src/token/tokens.rs:221
↓ 4 callers
Method
trailing_index
(&self)
crates/ruff_python_formatter/src/comments/map.rs:527
↓ 4 callers
Method
trailing_range
(&self)
crates/ruff_python_formatter/src/comments/map.rs:487
↓ 4 callers
Method
trailing_whitespace
Returns the whitespace *after* the `token` with the byte length
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:195
↓ 4 callers
Function
traverse_literal
Traverse a "literal" type annotation, applying `func` to each literal member. The function is called with each expression in the literal (excluding d
crates/ruff_python_semantic/src/analyze/typing.rs:590
↓ 4 callers
Method
triple_quotes
Return `true` if the f-string is triple-quoted, i.e., it begins and ends with three consecutive quote characters. For example: `f"""{bar}"""`
crates/ruff_python_ast/src/nodes.rs:1310
↓ 4 callers
Method
truthiness
(&self)
crates/ty_python_semantic/src/types/tuple.rs:2568
↓ 4 callers
Method
try_enter_with_mode
Given the type of an object that is used as a context manager (i.e. in a `with` statement), return the return type of its `__enter__` or `__aenter__`
crates/ty_python_semantic/src/types/context_manager.rs:178
↓ 4 callers
Method
try_expression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:1141
↓ 4 callers
Method
try_fold_solutions
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints/projection.rs:193
↓ 4 callers
Method
try_into_settings
(self)
crates/ruff_workspace/src/options.rs:1549
↓ 4 callers
Method
try_map
Maps captured parameter lists and `ParamSpec` references, retaining their intersection.
crates/ty_python_semantic/src/types.rs:2216
↓ 4 callers
Method
try_virtual_file
Tries to look up a virtual file by its path. Returns `None` if no such file exists yet.
crates/ruff_db/src/files.rs:240
↓ 4 callers
Method
tuple_base_class
Compute the specialized tuple class that this namedtuple inherits from. For example, `namedtuple("Point", [("x", int), ("y", int)])` inherits from `t
crates/ty_python_semantic/src/types/class/named_tuple.rs:282
↓ 4 callers
Method
tuple_runtime_element_specialization
Returns the specialization to use when the builtin tuple type parameter represents an individual runtime element. The builtin tuple class's type para
crates/ty_python_semantic/src/types/generics.rs:1371
↓ 4 callers
Function
ty_path
(prefix: impl AsRef<Path>)
crates/ty/tests/cli/server.rs:248
↓ 4 callers
Method
typed_dict_key_expected_type
(&self, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:68
↓ 4 callers
Function
typed_dict_matches_class_pattern
Return whether every runtime value represented by a `TypedDict` satisfies `class`. `TypedDict` is not a nominal subtype of `dict` in the static type
crates/ty_python_semantic/src/types/match_pattern.rs:113
↓ 4 callers
Method
typevar_id
(&mut self, db: &'db dyn Db, typevar: BoundTypeVarInstance<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1391
↓ 4 callers
Function
typing_self
Create a `typing.Self` type variable for a given class.
crates/ty_python_semantic/src/types/generics.rs:260
↓ 4 callers
Method
unbound_signatures
The unbound signatures stored directly on an actual or synthesized function. Note that this function returns `None` for unions or intersections of cal
crates/ty_python_semantic/src/types/method.rs:201
↓ 4 callers
Method
undecorated_type
(&self)
crates/ty_python_semantic/src/types/infer.rs:1901
↓ 4 callers
Method
underlying_function
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1263
↓ 4 callers
Method
union
Retain either alternative's deprecations: a union can invoke either accessor.
crates/ty_python_semantic/src/types.rs:1103
↓ 4 callers
Function
union_deprecated_properties
Combine accessor deprecations from alternative lookup paths. A non-deprecated path (`None`) does not suppress deprecations from another possible path.
crates/ty_python_semantic/src/types.rs:1170
↓ 4 callers
Method
unparse_stmt
(&mut self, ast: &Stmt)
crates/ruff_python_codegen/src/generator.rs:248
↓ 4 callers
Method
unparse_suite
(&mut self, suite: &Suite)
crates/ruff_python_codegen/src/generator.rs:242
↓ 4 callers
Method
unwrap_string_flags
Returns the [`AnyStringFlags`] style for the current string token of any kind. # Panics If it isn't a string or any f/t-string tokens.
crates/ruff_python_ast/src/token.rs:76
↓ 4 callers
Method
update
(self, other: Self)
python/ruff-ecosystem/ruff_ecosystem/check.py:313
↓ 4 callers
Method
update
( &mut self, array: lsp_types::NotebookCellArrayChange, updated_cells: Vec<lsp_types::
crates/ty_server/src/document/notebook.rs:135
↓ 4 callers
Method
update_program
(&mut self, settings: ProgramSettings)
crates/ty_test/src/db.rs:61
↓ 4 callers
Method
upstream_categories
(&self)
crates/ruff_linter/src/upstream_categories.rs:63
← previous
next →
3,601–3,700 of 31,766, ranked by callers