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
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:531
↓ 4 callers
Method
uv_workspace
(&self)
crates/ty_project/src/metadata.rs:446
↓ 4 callers
Method
uv_workspace_discovery_enabled
Whether ty should query uv for workspace metadata.
crates/ty_project/src/metadata.rs:396
↓ 4 callers
Method
uv_workspace_metadata
(&self)
crates/ty_project/src/metadata.rs:466
↓ 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
variable_index
( self, db: &'db dyn Db, typevar: BoundTypeVarIdentity<'db>, )
crates/ty_python_semantic/src/types/generics.rs:558
↓ 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:1984
↓ 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:750
↓ 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:2908
↓ 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:851
↓ 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_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:632
↓ 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:411
↓ 4 callers
Method
when_unconstrained
(self)
crates/ty_python_semantic/src/types/constraints.rs:1826
↓ 4 callers
Method
with_annotation
(self, annotation: Option<Annotation>)
crates/ty_project/src/metadata/options.rs:2645
↓ 4 callers
Method
with_complete_function_parentheses
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:181
↓ 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
↓ 4 callers
Method
with_materialization
( self, db: &'db dyn Db, materialization: Option<MaterializationKind>, )
crates/ty_python_semantic/src/types/recursive.rs:471
↓ 4 callers
Method
with_parameters
Create a new signature with the given parameters.
crates/ty_python_semantic/src/types/signatures.rs:2563
↓ 4 callers
Method
with_provenance
(self, provenance: Provenance<'db>)
crates/ty_python_semantic/src/types/call.rs:516
↓ 4 callers
Method
with_provenance
(mut self, provenance: ConstraintProvenance)
crates/ty_python_semantic/src/types/constraints/variables.rs:511
↓ 4 callers
Method
with_show_syntax_errors
(mut self, show_syntax_errors: bool)
crates/ty_server/src/session/options.rs:190
↓ 4 callers
Method
with_target
(self, target: Option<NavigationTarget>)
crates/ty_ide/src/inlay_hints.rs:334
↓ 4 callers
Method
with_uv_workspace_discovery
(mut self, enabled: bool)
crates/ty_project/src/metadata.rs:356
↓ 4 callers
Method
without_context_collection
Temporarily suppress error context collection for the duration of `f`. Note: we may eventually not need this method once we properly retain error con
crates/ty_python_semantic/src/types/relation.rs:1897
↓ 4 callers
Method
workspace_root
(&self)
crates/ty_project/src/uv/metadata.rs:34
↓ 4 callers
Method
workspaces
(&self)
crates/ty_server/src/session.rs:466
↓ 4 callers
Function
write_executable
(case: &CliTest, path: impl AsRef<Path>)
crates/ty/tests/cli/server.rs:256
↓ 4 callers
Method
write_fmt
(&mut self, args: Arguments<Context>)
crates/ruff_formatter/src/buffer.rs:147
↓ 3 callers
Function
Toml
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:259
↓ 3 callers
Method
_
(_: int)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI063.py:46
↓ 3 callers
Function
_ctype_from_dtype
(dtype)
crates/ruff_benchmark/resources/numpy/ctypeslib.py:458
↓ 3 callers
Function
_ctype_ndarray
Create an ndarray of the given element type and shape
crates/ruff_benchmark/resources/numpy/ctypeslib.py:353
↓ 3 callers
Function
a
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B012.py:1
↓ 3 callers
Method
add
Add resolved [`Settings`] under the given directory.
crates/ruff_workspace/src/resolver.rs:106
↓ 3 callers
Method
add
(&self, request: ImportRequest<'_>)
crates/ty_ide/src/importer.rs:26
↓ 3 callers
Method
add
(&mut self, element: Type<'db>, reachability: Truthiness)
crates/ty_python_semantic/src/place.rs:2083
↓ 3 callers
Method
add_bug_sub_diagnostics
Adds sub diagnostics that tell the user that this is a bug in ty and asks them to open an issue on GitHub.
crates/ruff_db/src/diagnostic/mod.rs:104
↓ 3 callers
Method
add_directive
(&mut self, directive: MdtestDirective, value: Option<String>)
crates/mdtest/src/parser.rs:1108
↓ 3 callers
Method
add_expression_range
Adds a folding range for an expression.
crates/ty_ide/src/folding_range.rs:152
↓ 3 callers
Method
add_in_place_impl
(&mut self, ty: Type<'db>, seen_aliases: &mut Vec<Type<'db>>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:812
↓ 3 callers
Method
add_keys_to_projection
( &self, db: &'db dyn Db, operator: ComparisonOperator, projection: &mut EnumK
crates/ty_python_semantic/src/types/equality/enums.rs:1046
↓ 3 callers
Method
add_not_constraint
Adds a new reachability constraint that is the ternary NOT of an existing one.
crates/ty_python_core/src/reachability_constraints.rs:393
↓ 3 callers
Method
add_parenthesized_expression_range
Adds a folding range for an expression if it is enclosed in parentheses.
crates/ty_ide/src/folding_range.rs:186
↓ 3 callers
Method
add_place_from_target
(&mut self, target: &ast::Expr)
crates/ty_python_core/src/builder/loop_bindings_visitor.rs:37
↓ 3 callers
Method
add_skip_query
Attempts to add the given completion to this collection. Unlike `Completion::add`, this will skip matching the query pattern associated with this col
crates/ty_ide/src/completion.rs:276
↓ 3 callers
Function
add_suppression_inner
( path: &Path, diagnostics: &[Diagnostic], locator: &Locator, comment_ranges: &CommentRanges,
crates/ruff_linter/src/noqa.rs:816
↓ 3 callers
Method
add_symbol
Add a new symbol and return its ID.
crates/ty_ide/src/symbols.rs:850
↓ 3 callers
Function
advance_candidates
Finds candidates for the next component of a module name, starting from candidates for its parent prefix. `filter` determines which file types may sup
crates/ty_module_resolver/src/resolve/search.rs:1149
↓ 3 callers
Method
alias_spec
(self)
crates/ty_python_semantic/src/types/special_form.rs:985
↓ 3 callers
Function
all_arguments_range
Return the range for a binding diagnostic that is not related to one specific argument. For a normal function call, this is just the range of the ent
crates/ty_python_semantic/src/types/call/bind.rs:11662
↓ 3 callers
Method
all_initialized
Returns `true` if all workspaces have been [initialized]. [initialized]: Workspaces::initialize
crates/ty_server/src/session.rs:1829
↓ 3 callers
Function
all_symbols
Get all symbols matching the query string. Returns symbols from all files in the workspace and dependencies, filtered by the query.
crates/ty_ide/src/all_symbols.rs:17
↓ 3 callers
Function
all_values_compare_equal
Return whether every value represented by `ty` is known to compare equal to every other value. Comparison evaluation is reused so this stays aligned
crates/ty_python_semantic/src/types/equality.rs:954
↓ 3 callers
Method
allow
Reports whether or not tuple size promotion is allowed for the given typevar in light of the constraints recorded on this object.
crates/ty_python_semantic/src/types/tuple/promotion.rs:157
↓ 3 callers
Method
anonymized_line_numbers
Whether to anonymize line numbers in full diagnostic output.
crates/ruff_db/src/diagnostic/mod.rs:1463
↓ 3 callers
Method
any_enabled_in
(&self, rules: &RuleSet)
crates/ruff_linter/src/settings/rule_table.rs:39
↓ 3 callers
Function
any_over_type_impl
Shared implementation for type searches.
crates/ty_python_semantic/src/types/visitor.rs:985
↓ 3 callers
Method
any_reachable
( mut self, db: &'db dyn Db, mut predicate: impl FnMut(DefinitionState<'db>) -> bool,
crates/ty_python_semantic/src/reachability.rs:2307
↓ 3 callers
Method
append
(self, x)
crates/ruff_linter/resources/test/fixtures/perflint/PERF401.py:66
↓ 3 callers
Method
apply
(self, data: &mut FileCacheData)
crates/ruff/src/cache.rs:487
↓ 3 callers
Method
apply_changes
(&mut self, changes: &[ChangeEvent])
crates/ty_project/src/db/changes.rs:97
↓ 3 callers
Method
apply_changes
( &mut self, changes: Vec<lsp_types::TextDocumentContentChangeEvent>, new_version: Doc
crates/ty_server/src/document/text_document.rs:93
↓ 3 callers
Function
apply_edits
Apply edits from right to left so each replacement leaves the remaining offsets unchanged.
crates/ty_ide/src/inlay_hints.rs:1498
↓ 3 callers
Method
apply_in_node
Determine whether to actually apply fluent layout in attribute, call and subscript formatting
crates/ruff_python_formatter/src/expression/mod.rs:1120
↓ 3 callers
Method
apply_specialization
Applies a specialization to this specialization. This is used, for instance, when a generic class inherits from a generic alias: ```py class A[T]: ..
crates/ty_python_semantic/src/types/generics.rs:1422
↓ 3 callers
Function
apply_type_alias_specialization
( db: &'db dyn Db, ty: Type<'db>, specialization: Specialization<'db>, recursion_context: Opti
crates/ty_python_semantic/src/types/type_alias.rs:459
↓ 3 callers
Method
apply_type_mapping_impl
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: &[Type<'db>
crates/ty_python_semantic/src/types/generics.rs:1464
← previous
next →
3,701–3,800 of 31,766, ranked by callers