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
↓ 3 callers
Function
unescape_string
Return a modified version of the string with all quote escapes removed.
crates/ruff_linter/src/rules/flake8_quotes/helpers.rs:29
↓ 3 callers
Method
union_narrowed_types
(&mut self, narrowed: Vec<(Type<'db>, Self)>)
crates/ty_python_semantic/src/types/infer/builder.rs:7389
↓ 3 callers
Method
unknowns_may_overlap
(&self, other: &Self)
crates/ty_python_semantic/src/types/equality/enums.rs:1026
↓ 3 callers
Method
update
Add or update a file cache at `path` relative to the package root.
crates/ruff/src/cache.rs:282
↓ 3 callers
Function
updateOptions
( workspace: Workspace | null, content: string | null, setError: (error: string | null) => void, )
playground/ty/src/Playground.tsx:648
↓ 3 callers
Method
update_all_origin
Updates the origin of `__all__` in the current module.
crates/ty_ide/src/symbols.rs:1194
↓ 3 callers
Function
update_and_synchronize_script
(case: &mut TestCase, source: &str)
crates/ty/tests/file_watching.rs:4534
↓ 3 callers
Function
update_file_and_wait_for_uv_sync
Updates an existing file, waits for its watcher event, and completes any resulting uv project synchronization. Relative paths are resolved against the
crates/ty/tests/file_watching.rs:4504
↓ 3 callers
Method
update_in_databases
(&self, session: &mut Session, client: &Client)
crates/ty_server/src/session.rs:2134
↓ 3 callers
Method
updated
(&self, new_source: String, source_map: &SourceMap)
crates/ruff_linter/src/source_kind.rs:89
↓ 3 callers
Method
url_for
Return the remote GitHub URL for the given path in this repository.
python/ruff-ecosystem/ruff_ecosystem/projects.py:475
↓ 3 callers
Function
urlopen
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC210.py:66
↓ 3 callers
Method
use_generic_filtering
(&self)
crates/ty_python_semantic/src/types/narrow.rs:2183
↓ 3 callers
Method
use_index
Looks up a node in the packed use array. Each earlier set bit on the same page accounts for one preceding entry in the array.
crates/ty_python_core/src/ast_ids.rs:206
↓ 3 callers
Function
use_uv_for_script
Whether to prepare and use uv's environment for this PEP 723 script. `TY_UV` takes precedence over script and project settings so users can set `TY_U
crates/ty_project/src/script.rs:220
↓ 3 callers
Function
uv_command
(case: &CliTest)
crates/ty/tests/cli/uv_workspace.rs:57
↓ 3 callers
Method
validate
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:1624
↓ 3 callers
Method
validate
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:11686
↓ 3 callers
Method
validate_attribute_assignment
Make sure that the attribute assignment `obj.attribute = value` is valid. `target` is the node for the left-hand side, `object_ty` is the type of `ob
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:34
↓ 3 callers
Function
validate_merged_dict_literal
( context: &InferContext<'db, 'ast>, typed_dict: TypedDictType<'db>, dict_expr: &'ast ast::ExprDic
crates/ty_python_semantic/src/types/typed_dict.rs:2880
↓ 3 callers
Function
validate_typed_dict_constructor
Validates a `TypedDict` constructor call. This handles keyword-only construction, a single positional mapping argument, and mixed positional-and-keyw
crates/ty_python_semantic/src/types/typed_dict.rs:2608
↓ 3 callers
Method
value_operands
Returns the types of this union's immediate operand values, if they were recorded.
crates/ty_python_semantic/src/types/union_type_instance.rs:306
↓ 3 callers
Method
variable_element_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:2618
↓ 3 callers
Method
variadic_parameter_annotation
Check that a `ParamSpec` component annotates the corresponding variadic parameter. A misplaced component or a bare `ParamSpec` gives the parameter an
crates/ty_python_semantic/src/types/infer/builder/function.rs:1195
↓ 3 callers
Method
variance_of_items
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, typevar: BoundTypeVarI
crates/ty_python_semantic/src/types/typed_dict.rs:587
↓ 3 callers
Method
verbose
(&self)
crates/ty_python_semantic/src/db.rs:207
↓ 3 callers
Method
version
()
crates/ruff_wasm/src/lib.rs:276
↓ 3 callers
Method
virtual_file
(name: &str)
crates/ty_server/tests/e2e/notebook.rs:801
↓ 3 callers
Method
visible_binding_sources
Returns nested binding sources that can update the same variable as `scope`. A synthetic binding can collect both `global` and `nonlocal` writes to o
crates/ty_python_core/src/definition.rs:1721
↓ 3 callers
Method
visit_body
(&mut self, body: &'ast [ruff_python_ast::Stmt])
crates/ruff_linter/src/rules/ruff/rules/suppression_comment_visitor.rs:177
↓ 3 callers
Method
visit_body_with_terminal
Visits each statement in `body`, tracking whether each is in a terminal position. A statement is considered terminal if it is the last in the body (w
crates/ruff_linter/src/rules/ruff/rules/fallible_context_manager.rs:251
↓ 3 callers
Method
visit_condition
(&mut self, test: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:2247
↓ 3 callers
Method
visit_decorator
(&mut self, decorator: &'a Decorator)
crates/ruff_db/src/parsed.rs:724
↓ 3 callers
Method
visit_decorator
(&mut self, decorator: &'a Decorator)
crates/ruff_python_ast/src/visitor.rs:30
↓ 3 callers
Method
visit_elif_else_clause
(&mut self, elif_else_clause: &'a ElifElseClause)
crates/ruff_python_ast/src/visitor.rs:96
↓ 3 callers
Method
visit_elif_else_clause
(&mut self, elif_else_clause: &'a ElifElseClause)
crates/ruff_linter/src/rules/isort/block.rs:297
↓ 3 callers
Method
visit_except_handler
(&mut self, except_handler: &'a ExceptHandler)
crates/ruff_python_ast/src/visitor.rs:54
↓ 3 callers
Method
visit_expr
(&mut self, expr: &ast::Expr)
crates/ty_python_semantic/src/pull_types.rs:104
↓ 3 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/pylint/rules/unnecessary_lambda.rs:262
↓ 3 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs:67
↓ 3 callers
Method
visit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:255
↓ 3 callers
Method
visit_interpolated_string_element
( &self, interpolated_string_element: &mut InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor/transformer.rs:89
↓ 3 callers
Method
visit_match_case
(&mut self, match_case: &'a MatchCase)
crates/ruff_python_ast/src/visitor.rs:81
↓ 3 callers
Method
visit_operator
(&mut self, operator: &'a Operator)
crates/ruff_python_ast/src/visitor.rs:42
↓ 3 callers
Method
visit_parameters
(&mut self, parameters: &'ast ast::Parameters)
crates/ty_python_core/src/builder.rs:5774
↓ 3 callers
Method
visit_parameters
(&mut self, parameters: &'a Parameters)
crates/ruff_linter/src/checkers/ast/mod.rs:2471
↓ 3 callers
Method
visit_signature
(&self, db: &'db dyn Db, signature: &Signature<'db>)
crates/ty_python_semantic/src/types/typevar.rs:2031
↓ 3 callers
Method
visit_stmt
(&mut self, stmt: &'a Stmt)
crates/ruff_linter/src/rules/isort/block.rs:124
↓ 3 callers
Method
visit_string_like_part
(&mut self, part: StringLikePart)
crates/ruff_python_formatter/src/string/normalize.rs:959
↓ 3 callers
Method
visit_token_kind
(&mut self, token_kind: TokenKind)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:522
↓ 3 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:202
↓ 3 callers
Method
visit_type_context_callables
Visits the callables that should contribute argument type context, including deferred constructor callables that are relevant to the matched upstream
crates/ty_python_semantic/src/types/call/bind.rs:1111
↓ 3 callers
Method
walk
( &self, visitor_builder: &mut dyn WalkDirectoryVisitorBuilder, configuration: WalkDir
crates/ruff_db/src/system/os.rs:297
↓ 3 callers
Function
walk_bytes_literal
( _visitor: &V, _bytes_literal: &'a BytesLiteral, )
crates/ruff_python_ast/src/visitor.rs:863
↓ 3 callers
Method
walk_directory
Creates a builder to recursively walk `path`. The walker ignores files according to [`::ignore::WalkBuilder::standard_filters`] when setting [`WalkDi
crates/ruff_db/src/system/os.rs:186
↓ 3 callers
Method
walk_edge
Walks one of the outgoing edges of an internal BDD node. `assignment` describes the constraint that the BDD node checks, and whether we are following
crates/ty_python_semantic/src/types/constraints/paths.rs:502
↓ 3 callers
Function
walk_generic_context
( db: &'db dyn Db, context: GenericContext<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/generics.rs:362
↓ 3 callers
Function
walk_identifier
( visitor: &mut V, identifier: &'a Identifier, )
crates/ruff_python_ast/src/visitor/source_order.rs:614
↓ 3 callers
Function
walk_known_instance_type
( db: &'db dyn Db, known_instance: KnownInstanceType<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/known_instance.rs:308
↓ 3 callers
Function
walk_match_case
(visitor: &mut V, match_case: &'a MatchCase)
crates/ruff_python_ast/src/visitor.rs:746
↓ 3 callers
Function
walk_module
(visitor: &mut V, module: &'a Mod)
crates/ruff_python_ast/src/visitor/source_order.rs:188
↓ 3 callers
Function
walk_parameter_with_default
( visitor: &mut V, parameter_with_default: &'a ParameterWithDefault, )
crates/ruff_python_ast/src/visitor/source_order.rs:397
↓ 3 callers
Function
walk_protocol_instance_member
Walks the types of a protocol member after binding any implicit receiver to `receiver_ty`.
crates/ty_python_semantic/src/types/protocol_class.rs:741
↓ 3 callers
Function
walk_signature
( db: &'db dyn Db, signature: &Signature<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/signatures.rs:854
↓ 3 callers
Function
walk_string_literal
( _visitor: &V, _string_literal: &'a StringLiteral, )
crates/ruff_python_ast/src/visitor.rs:857
↓ 3 callers
Function
walk_type_param
(visitor: &mut V, type_param: &'a TypeParam)
crates/ruff_python_ast/src/visitor.rs:707
↓ 3 callers
Function
walk_type_var_bounds
( db: &'db dyn Db, bounds: TypeVarBoundOrConstraints<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/typevar.rs:2500
↓ 3 callers
Function
walk_with_item
(visitor: &mut V, with_item: &'a WithItem)
crates/ruff_python_ast/src/visitor.rs:694
↓ 3 callers
Function
watch_paths
(db: &dyn Db, project: Project)
crates/ty_project/src/watch/project_watcher.rs:257
↓ 3 callers
Function
watched_site_packages
(server: &mut TestServer)
crates/ty_server/tests/e2e/goto_definition.rs:589
↓ 3 callers
Method
when_constraint_set_equivalent_to_owned
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, other: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:1011
↓ 3 callers
Method
when_equivalent_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, other: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:994
↓ 3 callers
Method
when_equivalent_to_with_materialization_visitor
( self, db: &'db dyn Db, other: Type<'db>, constraints: &'c ConstraintSetBuild
crates/ty_python_semantic/src/types/relation.rs:1066
↓ 3 callers
Method
when_trivially_disjoint_from
Checks whether `self` is disjoint from `other`, while being more accepting of false negatives. Use this when you want to _quickly_ check whether two t
crates/ty_python_semantic/src/types/relation.rs:1172
↓ 3 callers
Function
which_tool
(name: str, path: Path | None = None)
scripts/ty_benchmark/src/benchmark/tool.py:23
↓ 3 callers
Method
with_constrained_receiver
( self, db: &'db dyn Db, receiver: Type<'db>, constraint: Type<'db>, )
crates/ty_python_semantic/src/types/method.rs:247
↓ 3 callers
Method
with_constructed_instance_type
( mut self, db: &'db dyn Db, constructor_instance_type: Type<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:876
↓ 3 callers
Method
with_descriptor_kind
(self, db: &'db dyn Db, kind: CallableTypeKind)
crates/ty_python_semantic/src/types/function.rs:1271
↓ 3 callers
Method
with_detail
Indicate the given detail is about to start being written to this Writer This creates a scoped guard that when Dropped will record the given detail a
crates/ty_python_semantic/src/types/display.rs:403
↓ 3 callers
Method
with_for_excluded
Returns a new [`ExpressionContext`] which excludes `for` from an expression.
crates/ruff_python_parser/src/parser/expression.rs:3209
↓ 3 callers
Method
with_full_diagnostic_output
Advertise support for ty's fully rendered diagnostic output.
crates/ty_server/tests/e2e/main.rs:1575
↓ 3 callers
Method
with_generic_context
( mut self, db: &'db dyn Db, generic_context: Option<GenericContext<'db>>, )
crates/ty_python_semantic/src/types/call/bind.rs:900
↓ 3 callers
Method
with_id
(mut self, group_id: Option<GroupId>)
crates/ruff_formatter/src/builders.rs:1424
↓ 3 callers
Method
with_imported_final_impl
This can be called cross-module, so resolve imports through semantic queries without reading AST nodes from the file containing the candidate definiti
crates/ty_python_semantic/src/place.rs:949
↓ 3 callers
Method
with_inherited_generic_context
( self, db: &'db dyn Db, inherited_generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/function.rs:1349
↓ 3 callers
Method
with_lexical_visibility
Includes the lexical visibility of each scope. A class namespace is visible in the class itself and through any intervening annotation scopes (e.g. bo
crates/ty_python_core/src/lib.rs:882
↓ 3 callers
Method
with_magic_trailing_comma
(mut self, trailing_comma: MagicTrailingComma)
crates/ruff_python_formatter/src/options.rs:178
↓ 3 callers
Method
with_materialization_kind
( self, db: &'db dyn Db, materialization_kind: Option<MaterializationKind>, )
crates/ty_python_semantic/src/types/type_alias.rs:719
↓ 3 callers
Method
with_measure_mode
(mut self, mode: MeasureMode)
crates/ruff_formatter/src/printer/call_stack.rs:79
↓ 3 callers
Method
with_options
(mut self, options: Self::Options)
crates/ruff_python_formatter/src/pattern/mod.rs:36
↓ 3 callers
Method
with_options
(mut self, options: Self::Options)
crates/ruff_python_formatter/src/expression/mod.rs:69
↓ 3 callers
Method
with_options
(self, options: Self::Options)
crates/ruff_python_formatter/src/other/with_item.rs:86
↓ 3 callers
Method
with_origin
(mut self, origin: TypeOrigin)
crates/ty_python_semantic/src/place.rs:155
↓ 3 callers
Method
with_prefix
(mut self, prefix: FStringPrefix)
crates/ruff_python_ast/src/nodes.rs:1164
↓ 3 callers
Method
with_recursion_guard
( &self, db: &'db dyn Db, source: Type<'db>, target: Type<'db>, work:
crates/ty_python_semantic/src/types/relation.rs:1924
↓ 3 callers
Method
with_recursively_defined
(mut self, value: RecursivelyDefined)
crates/ty_python_semantic/src/types/literal.rs:72
↓ 3 callers
Method
with_required
(mut self, yes: bool)
crates/ty_python_semantic/src/types/typed_dict.rs:3313
↓ 3 callers
Method
with_return_type
Create a new signature with the given return type.
crates/ty_python_semantic/src/types/signatures.rs:2568
↓ 3 callers
Method
with_semantic_checker
(&mut self, f: impl FnOnce(&mut SemanticSyntaxChecker, &Checker))
crates/ruff_linter/src/checkers/ast/mod.rs:655
↓ 3 callers
Method
with_setting
(mut self, setting: &'static str)
crates/ruff_linter/src/rule_selector.rs:98
← previous
next →
4,801–4,900 of 31,766, ranked by callers