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
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:905
↓ 4 callers
Function
symbol_impl
Implementation of [`symbol`].
crates/ty_python_semantic/src/place.rs:1604
↓ 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:72
↓ 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:712
↓ 4 callers
Function
test_nonexistent_path
(path: &str)
crates/ruff_db/src/vendored.rs:680
↓ 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:1020
↓ 4 callers
Method
to_range
(&self, text: &str, index: &LineIndex, encoding: PositionEncoding)
crates/ruff_server/src/edit/range.rs:67
↓ 4 callers
Method
to_search_paths
( &self, context: OptionsContext<'_>, project_name: &str, site_packages_paths:
crates/ty_project/src/metadata/options.rs:385
↓ 4 callers
Method
to_settings
( &self, db: &dyn Db, strategy: &Strategy, )
crates/ty_project/src/metadata.rs:601
↓ 4 callers
Method
to_string_parts
(&self)
crates/ty_python_semantic/src/types/display.rs:804
↓ 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:1297
↓ 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:1142
↓ 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:2217
↓ 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:1359
↓ 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:69
↓ 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:1462
↓ 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:1907
↓ 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:1102
↓ 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:1169
↓ 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:314
↓ 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
upstream_categories
(&self)
crates/ruff_linter/src/upstream_categories.rs:63
↓ 4 callers
Method
uris
Returns a list of cell URIs in the order they appear in the array.
crates/ruff_server/src/edit/notebook.rs:228
↓ 4 callers
Method
url
Return the URL for the rule documentation.
crates/ruff_linter/src/registry.rs:376
↓ 4 callers
Method
used_interiors
(&self)
crates/ty_python_core/src/reachability_constraints.rs:171
↓ 4 callers
Function
user_visible_definitions
Returns the user-visible definitions represented by a use-def binding. Comprehension walruses are represented in the containing scope by synthetic ea
crates/ty_python_semantic/src/types/definition_resolution.rs:532
↓ 4 callers
Method
uv_workspace
(&self)
crates/ty_project/src/metadata.rs:438
↓ 4 callers
Method
uv_workspace_metadata
(&self)
crates/ty_project/src/metadata.rs:458
↓ 4 callers
Method
validate_assignment_target
Validate that the given expression is a valid assignment target. If the expression is a list or tuple, then validate each element in the list. If it'
crates/ruff_python_parser/src/parser/statement.rs:3856
↓ 4 callers
Method
validate_dynamic_type_bases
Validate base classes from the second argument of a `type()` or `types.new_class()` call. This validates bases that are valid `ClassBase` variants bu
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:123
↓ 4 callers
Method
value
(self)
crates/ruff_python_formatter/src/expression/binary_like.rs:1081
↓ 4 callers
Method
value
Returns the value expression for assignment-based definitions. Returns `Some` for `Assignment` and `AnnotatedAssignment` (if it has a value), `None`
crates/ty_python_core/src/definition.rs:1182
↓ 4 callers
Method
value_expression_types
Yields the operand types used for runtime checks such as `isinstance`. Recorded operands appear in first-occurrence order, counting equivalent special
crates/ty_python_semantic/src/types/union_type_instance.rs:381
↓ 4 callers
Method
variance_of
Refer to this signature's equation, including recursive `TypeOf` references to itself.
crates/ty_python_semantic/src/types/function.rs:1991
↓ 4 callers
Function
vendored_typeshed_versions
(vendored: &VendoredFileSystem)
crates/ty_module_resolver/src/typeshed.rs:13
↓ 4 callers
Method
version
(&self)
crates/ty_server/src/session.rs:1956
↓ 4 callers
Method
visit
Runs the directory traversal and calls the passed `builder` to create visitors that do the visiting. The walker may run multiple threads to visit the
crates/ruff_db/src/system/walk_directory.rs:95
↓ 4 callers
Method
visit_annotation
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:27
↓ 4 callers
Method
visit_arguments
(&mut self, arguments: &'a Arguments)
crates/ruff_db/src/parsed.rs:742
↓ 4 callers
Method
visit_body
(&mut self, body: &'a [Stmt])
crates/ruff_python_ast/src/statement_visitor.rs:7
↓ 4 callers
Method
visit_body
(&self, body: &mut [Stmt])
crates/ruff_python_ast/src/visitor/transformer.rs:80
↓ 4 callers
Method
visit_body
(&mut self, body: &'a [Stmt])
crates/ruff_linter/src/rules/flake8_return/visitor.rs:213
↓ 4 callers
Method
visit_constraints_and_then
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:727
↓ 4 callers
Method
visit_decorator
Visit decorators, handling simple name decorators vs complex expressions
crates/ty_ide/src/semantic_tokens.rs:1232
↓ 4 callers
Method
visit_expr
(&mut self, expr: &'db ast::Expr)
crates/ty_ide/src/symbols.rs:1538
↓ 4 callers
Method
visit_expr_with_context
(&mut self, expr: &'ast ast::Expr, context: ExpressionContext)
crates/ty_python_core/src/builder.rs:3487
↓ 4 callers
Method
visit_guarded
(&self, db: &'db dyn Db, ty: Type<'db>, visit: impl FnOnce())
crates/ty_python_semantic/src/types/tuple/promotion.rs:28
↓ 4 callers
Method
visit_interpolated_string_element
( &mut self, interpolated_string_element: &'a InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor.rs:102
↓ 4 callers
Method
visit_node
(&mut self, storage: &ConstraintSetStorage<'_>, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:2947
↓ 4 callers
Method
visit_parameters
(&mut self, parameters: &'a Parameters)
crates/ruff_python_ast/src/visitor.rs:60
↓ 4 callers
Method
visit_parameters
Visit parameters for a function or lambda expression and classify them as parameters, selfParameter, or clsParameter as appropriate.
crates/ty_ide/src/semantic_tokens.rs:754
↓ 4 callers
Method
visit_pattern
(&self, pattern: &mut Pattern)
crates/ruff_python_ast/src/visitor/transformer.rs:71
↓ 4 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/generics.rs:874
↓ 4 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1353
↓ 4 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/tuple/promotion.rs:46
↓ 4 callers
Method
visit_type_params
(&mut self, type_params: &'a TypeParams)
crates/ruff_db/src/parsed.rs:786
↓ 4 callers
Method
visit_type_params
(&mut self, type_params: &'a TypeParams)
crates/ruff_python_ast/src/visitor.rs:75
↓ 4 callers
Function
walk_alias
(_visitor: &V, _alias: &'a Alias)
crates/ruff_python_ast/src/visitor.rs:855
↓ 4 callers
Function
walk_arguments
(visitor: &mut V, arguments: &'a Arguments)
crates/ruff_python_ast/src/visitor.rs:658
↓ 4 callers
Method
walk_directory
Returns a builder for walking the directory tree of `path`. The only files that are ignored when setting `WalkDirectoryBuilder::standard_filters` are
crates/ruff_db/src/system/memory_fs.rs:272
↓ 4 callers
Function
walk_parameter
(visitor: &mut V, parameter: &'a Parameter)
crates/ruff_python_ast/src/visitor.rs:684
↓ 4 callers
Function
walk_signature
( db: &'db dyn Db, signature: &Signature<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/signatures.rs:883
↓ 4 callers
Function
walk_t_string
(visitor: &mut V, t_string: &'a TString)
crates/ruff_python_ast/src/visitor.rs:835
↓ 4 callers
Function
walk_type_params
(visitor: &mut V, type_params: &'a TypeParams)
crates/ruff_python_ast/src/visitor.rs:701
↓ 4 callers
Method
when_assignable_to_owned
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:631
↓ 4 callers
Method
when_subtype_of
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:410
↓ 4 callers
Method
when_unconstrained
(self)
crates/ty_python_semantic/src/types/constraints.rs:1897
↓ 4 callers
Method
with_annotation
(self, annotation: Option<Annotation>)
crates/ty_project/src/metadata/options.rs:2546
↓ 4 callers
Method
with_complete_function_parentheses
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:174
↓ 4 callers
Method
with_kind
(self, kind: FoldingRangeKind)
crates/ty_ide/src/folding_range.rs:42
↓ 4 callers
Method
with_line_width
(mut self, line_width: LineWidth)
crates/ruff_python_formatter/src/options.rs:190
← previous
next →
3,601–3,700 of 31,562, ranked by callers