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
↓ 6 callers
Method
sub_diagnostics
(&self, workspace: &Workspace)
crates/ty_wasm/src/lib.rs:922
↓ 6 callers
Function
suite
Run lint rules over a suite of [`Stmt`] syntax nodes.
crates/ruff_linter/src/checkers/ast/analyze/suite.rs:9
↓ 6 callers
Method
supports_pep_701
Return `true` if the current version supports [PEP 701]. [PEP 701]: https://peps.python.org/pep-0701/
crates/ruff_python_ast/src/python_version.rs:90
↓ 6 callers
Function
suppressions
(db: &dyn Db, file: PythonFile<'_>)
crates/ty_python_semantic/src/suppression.rs:89
↓ 6 callers
Method
symbol_by_name
Looks up a symbol by its name and returns a reference to it, if it exists. This should only be used in diagnostics and tests.
crates/ty_python_core/src/place.rs:273
↓ 6 callers
Method
symbol_text
Returns the symbol text that should be used. Usually this is identical to the symbol text given to the corresponding [`ImportRequest`], but this may
crates/ty_python_semantic/src/importer.rs:668
↓ 6 callers
Method
system_path_to_document
(&self, path: &SystemPath)
crates/ty_server/src/system.rs:153
↓ 6 callers
Function
tab_offset
Returns the number of columns from `column` to the next tab stop.
crates/ruff_python_trivia/src/whitespace.rs:39
↓ 6 callers
Method
take_salsa_events
Empties the internal store of salsa events that have been emitted, and returns them as a `Vec` (equivalent to [`std::mem::take`]).
crates/ruff_db/src/lib.rs:174
↓ 6 callers
Method
target_version
(&self)
crates/ruff_python_formatter/src/options.rs:119
↓ 6 callers
Method
teardown_expression_cache
(&mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:1021
↓ 6 callers
Function
test_directory
(dirname: &str)
crates/ruff_db/src/vendored.rs:586
↓ 6 callers
Method
to_owned
(&self)
crates/ruff_db/src/system/path.rs:502
↓ 6 callers
Method
to_std_range
(&self)
crates/ruff_text_size/src/range.rs:485
↓ 6 callers
Method
to_str
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1590
↓ 6 callers
Method
to_string
Returns the string representation of the symbol kind.
crates/ty_ide/src/symbols.rs:351
↓ 6 callers
Method
top
(&self)
crates/ruff_formatter/src/printer/stack.rs:22
↓ 6 callers
Function
trailing_comments
Formats the passed comments as trailing comments
crates/ruff_python_formatter/src/comments/format.rs:139
↓ 6 callers
Function
trailing_semicolon
Returns the range of the semicolon terminating the statement or `None` if the statement isn't terminated by a semicolon.
crates/ruff_python_formatter/src/statement/mod.rs:89
↓ 6 callers
Method
try_iterate_with_mode
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mode: EvaluationMode,
crates/ty_python_semantic/src/types/iteration.rs:240
↓ 6 callers
Method
ty
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1364
↓ 6 callers
Method
unknown_specialization
Returns the unknown specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we r
crates/ty_python_semantic/src/types/class.rs:805
↓ 6 callers
Method
unpack
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/arguments.rs:403
↓ 6 callers
Method
unspecialized
Returns the alias without an applied specialization or pending materialization.
crates/ty_python_semantic/src/types/type_alias.rs:687
↓ 6 callers
Method
unspecialized_return_type
Return the declared return type after constructor normalization, but before applying any specialization inferred for this overload.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:886
↓ 6 callers
Method
unsupported_syntax_errors
Returns a list of version-related syntax errors found during parsing.
crates/ruff_python_parser/src/lib.rs:419
↓ 6 callers
Method
update
(mut self, chars: impl Iterator<Item = char>)
crates/ruff_linter/src/line_width.rs:195
↓ 6 callers
Method
update_program
(self, db: &mut dyn Db, settings: ProgramSettings)
crates/ty_project/src/lib.rs:343
↓ 6 callers
Method
uri
Returns the document URI supplied by the client.
crates/ty_server/src/session.rs:1629
↓ 6 callers
Method
user_config_directory
(&self)
crates/ty/tests/common/mod.rs:168
↓ 6 callers
Function
venv_with_ty
(case: &CliTest, prefix: &str)
crates/ty/tests/cli/server.rs:243
↓ 6 callers
Method
visible_ancestor_scopes
Returns an iterator over ancestors of `scope` that are visible for name resolution, starting with `scope` itself. An enclosing class is visible throug
crates/ty_python_core/src/lib.rs:678
↓ 6 callers
Method
visit_annotation
Visit an annotation or other expression that should be interpreted as a type form.
crates/ty_ide/src/semantic_tokens.rs:1075
↓ 6 callers
Method
visit_body
(&mut self, body: &'ast [Stmt])
crates/ruff_python_formatter/src/range.rs:251
↓ 6 callers
Method
visit_expr
(&mut self, expr: &'ast ast::Expr)
crates/ty_python_core/src/builder.rs:5768
↓ 6 callers
Method
visit_expr
Check `expr` for semantic syntax errors and update the checker's internal state.
crates/ruff_python_parser/src/semantic_errors.rs:923
↓ 6 callers
Method
visit_guarded
( &self, db: &'db dyn Db, ty: Type<'db>, visit_arguments: impl
crates/ty_python_semantic/src/types/visitor.rs:705
↓ 6 callers
Method
visit_node
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:196
↓ 6 callers
Method
visit_pattern
(&mut self, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:84
↓ 6 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/typevar.rs:1008
↓ 6 callers
Function
walk_comprehension
( visitor: &mut V, comprehension: &'a Comprehension, )
crates/ruff_python_ast/src/visitor.rs:633
↓ 6 callers
Function
walk_type_alias_arguments
Visit an alias's type arguments without evaluating its value. This includes arguments for parameters that the alias's value does not use.
crates/ty_python_semantic/src/types/type_alias.rs:508
↓ 6 callers
Method
when_disjoint_from
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, other: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:1116
↓ 6 callers
Method
when_false
(self)
crates/ty_python_semantic/src/types/constraints.rs:1893
↓ 6 callers
Method
when_some_and
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, f: impl FnOn
crates/ty_python_semantic/src/types/constraints.rs:173
↓ 6 callers
Method
width
(self)
crates/ruff_formatter/src/format_element.rs:545
↓ 6 callers
Method
width
Return the measured width of the line, without any trailing pragma comments.
crates/ruff_linter/src/rules/pycodestyle/overlong.rs:98
↓ 6 callers
Method
with_expanded_typevars_and_newtypes
Return a version of this intersection type where any type variables in the positive elements have been replaced by their bounds or constraints, and wh
crates/ty_python_semantic/src/types/set_theoretic.rs:1470
↓ 6 callers
Method
with_extra_path
Configure an extra module-search path and create files relative to that directory.
crates/ty_module_resolver/src/testing.rs:144
↓ 6 callers
Method
with_fix_applicability
Set the lowest applicability considered available for automatic fixing. This controls fix availability indicators. Full output shows all suggested fi
crates/ruff_db/src/diagnostic/mod.rs:1555
↓ 6 callers
Method
with_group_id
(mut self, group_id: Option<GroupId>)
crates/ruff_formatter/src/builders.rs:1587
↓ 6 callers
Method
with_preview
(mut self, preview: PreviewMode)
crates/ruff_python_formatter/src/options.rs:214
↓ 6 callers
Method
with_provenance
(mut self, provenance: Provenance<'db>)
crates/ty_python_semantic/src/place.rs:190
↓ 6 callers
Method
with_self
Prepend an optional extra synthetic argument (for a `self` or `cls` parameter) to the front of this argument list. (If `bound_self` is none, we return
crates/ty_python_semantic/src/types/call/arguments.rs:742
↓ 6 callers
Method
with_source_overload_index
Records this signature's position in its defining function's overload list.
crates/ty_python_semantic/src/types/signatures.rs:2510
↓ 6 callers
Method
with_ty_at
Return [`Self`] with the ty binary copied to the specified path instead.
crates/ty/tests/self_environment.rs:385
↓ 6 callers
Method
write_entry
(&self, entry: Result<DirectoryEntry, Error>)
crates/ruff_db/src/system/walk_directory.rs:294
↓ 6 callers
Function
write_file
(path: impl AsRef<SystemPath>, content: &str)
crates/ty/tests/file_watching.rs:646
↓ 6 callers
Method
write_symlink
( &self, original: impl AsRef<Path>, link: impl AsRef<Path>, )
crates/ty/tests/common/mod.rs:126
↓ 6 callers
Method
write_virtual_environment
( &self, path: impl AsRef<SystemPath>, python_version: PythonVersion, )
crates/ty/tests/file_watching.rs:65
↓ 6 callers
Method
write_virtual_file
Stores a new virtual file in the file system. The operation overrides the content for an existing virtual file with the same `path`.
crates/ruff_db/src/system/memory_fs.rs:246
↓ 5 callers
Method
absolute
Returns the absolute path of this glob pattern.
crates/ty_project/src/glob/portable.rs:235
↓ 5 callers
Method
add_delimited_expression_range
Add a folding range for an expression that excludes enclosing delimiters like parentheses or square braces.
crates/ty_ide/src/folding_range.rs:169
↓ 5 callers
Method
add_end
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:469
↓ 5 callers
Method
add_interior
(&mut self, node: InteriorNode)
crates/ty_python_core/src/narrowing_constraints.rs:193
↓ 5 callers
Method
add_negated_atom
( &mut self, predicate: ScopedPredicateId, )
crates/ty_python_core/src/narrowing_constraints.rs:253
↓ 5 callers
Method
add_standalone_expression
Record an expression that needs to be a Salsa ingredient, because we need to infer its type standalone (type narrowing tests, RHS of an assignment.)
crates/ty_python_core/src/builder.rs:2911
↓ 5 callers
Method
add_standalone_expression_impl
( &mut self, expression_node: &ast::Expr, expression_kind: ExpressionKind, ass
crates/ty_python_core/src/builder.rs:2952
↓ 5 callers
Function
all_end_of_scope_members
Iterate over all declarations and bindings that exist at the end of the given scope.
crates/ty_python_semantic/src/types/list_members.rs:34
↓ 5 callers
Method
ancestor_scopes
Returns an iterator over all ancestors of `scope`, starting with `scope` itself.
crates/ty_python_core/src/lib.rs:662
↓ 5 callers
Method
applicability
Return the [`Applicability`] of the [`Fix`].
crates/ruff_diagnostics/src/fix.rs:158
↓ 5 callers
Method
apply_changes
( &mut self, changes: Vec<lsp_types::TextDocumentContentChangeEvent>, new_version: Doc
crates/ruff_server/src/edit/text_document.rs:84
↓ 5 callers
Method
apply_optional_owner_specialization_to_member
Projects a member from its generic owner, applying the owner's specialization to both ordinary occurrences and the domain of any retained synthetic `S
crates/ty_python_semantic/src/types.rs:9717
↓ 5 callers
Method
as_ann_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:658
↓ 5 callers
Method
as_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:213
↓ 5 callers
Method
as_class_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:436
↓ 5 callers
Method
as_expression
Returns the [`Expr`] if this is a expression, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:101
↓ 5 callers
Method
as_full_str
(&self)
crates/ruff_source_file/src/newlines.rs:267
↓ 5 callers
Method
as_i64
Return the [`Int`] as an i64, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:133
↓ 5 callers
Method
as_import_from_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1028
↓ 5 callers
Method
as_literal_expr
Returns [`LiteralExpressionRef`] if the expression is a literal expression.
crates/ruff_python_ast/src/nodes.rs:76
↓ 5 callers
Method
as_notebook
(&self)
crates/ruff_server/src/session/index.rs:522
↓ 5 callers
Method
as_paramspec_typevar
If this type is a `ParamSpec` type variable, returns it. Otherwise, returns `None`.
crates/ty_python_semantic/src/types.rs:6948
↓ 5 callers
Method
as_single_document
Attempt to access the single inner text document selected by the query. If this query is selecting an entire notebook document, this will return `None
crates/ruff_server/src/session/index.rs:650
↓ 5 callers
Method
as_slice
(&self)
crates/ruff_python_ast/src/name.rs:743
↓ 5 callers
Method
as_statement
Returns the [`Stmt`] if this is a statement, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:92
↓ 5 callers
Method
as_str
(&self)
crates/ruff_db/src/vendored.rs:408
↓ 5 callers
Method
as_str
(&self)
crates/ruff_python_codegen/src/stylist.rs:161
↓ 5 callers
Method
as_str
(&self)
crates/ruff_python_trivia/src/cursor.rs:45
↓ 5 callers
Method
as_str
(self)
crates/ty_ide/src/docstring/markdown/structured.rs:134
↓ 5 callers
Method
as_system_path
(&self)
crates/ruff_db/src/files/path.rs:33
↓ 5 callers
Method
as_unary_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1755
↓ 5 callers
Method
as_vendored_path
(&self)
crates/ty_module_resolver/src/path.rs:831
↓ 5 callers
Method
as_writable
(&self)
crates/ty_test/src/db.rs:598
↓ 5 callers
Function
assert_bindings
(place: &PlaceState, expected: &[(u32, ScopedNarrowingConstraint)])
crates/ty_python_core/src/use_def/place_state.rs:800
↓ 5 callers
Function
assert_edits
(actual: Option<&WorkspaceEdit>, expected: &[(Uri, &[ExpectedEdit<'_>])])
crates/ty_server/tests/e2e/will_rename_files.rs:269
↓ 5 callers
Function
assert_error_chain_eq
(error: ProjectMetadataError, message: &str)
crates/ty_project/src/metadata.rs:2144
↓ 5 callers
Method
assert_no_pending_messages
(&self)
crates/ty_server/tests/e2e/main.rs:345
↓ 5 callers
Method
assignable_solutions_with_inferable
Calculates the [`CandidateSolutions`] that represent the valid solutions for when `self` is constraint-set assignable to `target`.
crates/ty_python_semantic/src/types/constraints.rs:3640
↓ 5 callers
Method
assignment_holds
(&self, assignment: Assignment<AtomicConstraintId>)
crates/ty_python_semantic/src/types/constraints/paths.rs:541
← previous
next →
2,501–2,600 of 31,562, ranked by callers