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
↓ 12 callers
Method
with_definition
Create a new signature with the given definition.
crates/ty_python_semantic/src/types/signatures.rs:2516
↓ 12 callers
Function
workspace_case
()
crates/ty/tests/cli/uv_workspace.rs:18
↓ 12 callers
Method
write
(&self, f: &mut std::fmt::Formatter, start_range: bool)
crates/ruff/src/args.rs:1325
↓ 12 callers
Method
write_element
(&mut self, element: FormatElement)
crates/ruff_formatter/src/buffer.rs:139
↓ 11 callers
Method
add_or_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:295
↓ 11 callers
Method
add_symbol
Add a symbol to the place table and the use-def map. Return the [`ScopedPlaceId`] that uniquely identifies the symbol in both.
crates/ty_python_core/src/builder.rs:1374
↓ 11 callers
Method
add_token
( &mut self, ranged: impl Ranged, token_type: SemanticTokenType, modifiers: Se
crates/ty_ide/src/semantic_tokens.rs:333
↓ 11 callers
Method
all_end_of_scope_symbol_declarations
( &'map self, )
crates/ty_python_core/src/use_def.rs:1430
↓ 11 callers
Function
apply_changes_and_synchronize_project
Applies watcher events, requests any resulting uv project refresh, and waits for pending uv synchronizations to finish.
crates/ty/tests/file_watching.rs:4518
↓ 11 callers
Method
apply_type_mapping_impl
( &self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContex
crates/ty_python_semantic/src/types/signatures.rs:291
↓ 11 callers
Method
as_char
Get the character used to represent this quote.
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:75
↓ 11 callers
Method
as_paramspec_with_prefix
Returns the prefix parameters and bound `ParamSpec` if this parameter list is either `P` or `Concatenate[<prefix-params>, P]`. For the narrower bare-
crates/ty_python_semantic/src/types/signatures.rs:5318
↓ 11 callers
Method
as_single_part_string
Return `Some(literal)` if the string only consists of a single `StringLiteral` part (indicating that it is not implicitly concatenated). Otherwise, re
crates/ruff_python_ast/src/nodes.rs:1510
↓ 11 callers
Method
as_str
(self)
crates/ty_ide/src/completion.rs:773
↓ 11 callers
Function
assert_no_match
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:382
↓ 11 callers
Method
assignability_error_context
Re-run the assignability check with error context collection enabled. This should normally be called when `is_assignable_to` has returned `false` and
crates/ty_python_semantic/src/types/relation.rs:506
↓ 11 callers
Method
bind_self_typevars
Bind `Self` type variables in this type to a concrete self type. Uses MRO-based matching: a `Self` typevar is only bound if its owner class is in the
crates/ty_python_semantic/src/types.rs:2612
↓ 11 callers
Method
callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:316
↓ 11 callers
Method
cell
Returns the (raw) cell number (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:29
↓ 11 callers
Function
check_types
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types.rs:202
↓ 11 callers
Method
class_member_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, po
crates/ty_python_semantic/src/types.rs:4486
↓ 11 callers
Method
cmp
Group diagnostics by file and sort them in source order. For diagnostics at the same location, fall back to severity (with fatal messages sorting befo
crates/ruff_db/src/diagnostic/mod.rs:528
↓ 11 callers
Function
code_actions_at
( server: &TestServer, diagnostics: DocumentDiagnosticReport, file: &SystemPath, range: Range,
crates/ty_server/tests/e2e/code_actions.rs:6
↓ 11 callers
Method
command
(&self)
crates/ty/tests/common/mod.rs:149
↓ 11 callers
Method
context
Return the [`LintContext`] for the current analysis. Note that you should always prefer calling methods like `settings`, `report_diagnostic`, or `is_
crates/ruff_linter/src/checkers/ast/mod.rs:694
↓ 11 callers
Method
create_directory_all
Creates a directory at `path`. All enclosing directories are created if they don't exist.
crates/ruff_db/src/system/memory_fs.rs:324
↓ 11 callers
Method
dataclass_transformer_params
(self)
crates/ty_python_semantic/src/types/class.rs:309
↓ 11 callers
Method
definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:324
↓ 11 callers
Method
definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:223
↓ 11 callers
Method
definition
Returns the [`Definition`] of this function. ## Warning This uses the semantic index to find the definition of the function. This means that if the
crates/ty_python_semantic/src/types/function.rs:462
↓ 11 callers
Method
did_change_watched_files
Send a `workspace/didChangeWatchedFiles` notification with the given file events
crates/ty_server/tests/e2e/main.rs:949
↓ 11 callers
Method
display
(self, python_version: PythonVersion)
crates/ty_python_semantic/src/types/class/known.rs:1230
↓ 11 callers
Method
domain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1137
↓ 11 callers
Method
edits
Return a slice of the [`Edit`] elements in the [`Fix`], sorted by [`Edit::start`] in ascending order.
crates/ruff_diagnostics/src/fix.rs:149
↓ 11 callers
Method
env_clear
Clears the inherited environment and any variables previously set on this command.
crates/ruff_db/src/system/command.rs:49
↓ 11 callers
Method
fallback_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:268
↓ 11 callers
Method
fields
Returns a list of all annotated attributes defined in this class, or any of its superclasses. See [`StaticClassLiteral::own_fields`] for more details
crates/ty_python_semantic/src/types/class/static_literal.rs:2603
↓ 11 callers
Method
file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:70
↓ 11 callers
Function
file_system
()
crates/ty_vendored/src/lib.rs:18
↓ 11 callers
Method
file_uri
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:666
↓ 11 callers
Method
files
(&self)
crates/ruff_db/src/lib.rs:200
↓ 11 callers
Method
first
(&self)
crates/ruff_linter/src/suppression.rs:188
↓ 11 callers
Method
first_operand
Returns the initial operand (`a` in `a < b <= c`). # Panics Panics if there are no operands. The parser always produces at least two operands, synth
crates/ruff_python_ast/src/nodes.rs:125
↓ 11 callers
Method
focus_range
(&self)
crates/ty_ide/src/lib.rs:157
↓ 11 callers
Method
has_starred_annotation
Return `true` if this parameter has an unpacked variadic annotation, e.g. `*args: *Ts`, `*args: Unpack[Ts]`, or `*args: *tuple[int, *tuple[str, ...],
crates/ty_python_semantic/src/types/signatures.rs:6343
↓ 11 callers
Method
header_range
Returns the range of the class's "header". For static classes, this is the class name and any arguments passed to the `class` statement. For dynamic
crates/ty_python_semantic/src/types/class.rs:903
↓ 11 callers
Method
hide_severity
Whether to hide a diagnostic's severity or not.
crates/ruff_db/src/diagnostic/mod.rs:1507
↓ 11 callers
Method
hover_request
Send a `textDocument/hover` request for the document at the given path and position.
crates/ty_server/tests/e2e/main.rs:1091
↓ 11 callers
Method
ignore_possibly_undefined
Returns the type of the place, ignoring possible undefinedness. If the place is *definitely* undefined, this function will return `None`. Otherwise,
crates/ty_python_semantic/src/place.rs:292
↓ 11 callers
Method
into_unfolded
(self)
crates/ty_python_semantic/src/types/recursive.rs:718
↓ 11 callers
Method
is_absolute
(&self)
crates/ruff_db/src/system/path.rs:82
↓ 11 callers
Method
is_assignability
(self)
crates/ty_python_semantic/src/types/relation.rs:176
↓ 11 callers
Method
is_assignment
(&self, expr: &Expr)
crates/ruff_linter/src/rules/pylint/helpers.rs:98
↓ 11 callers
Method
is_bound
(self)
crates/ty_python_core/src/place.rs:132
↓ 11 callers
Function
is_const_true
Return `true` if an [`Expr`] is a literal `True`.
crates/ruff_python_ast/src/helpers.rs:838
↓ 11 callers
Method
is_data_descriptor
Returns whether this type is a data descriptor, i.e. defines `__set__` or `__delete__`. If this type is a union, requires all elements of union to be
crates/ty_python_semantic/src/types.rs:5590
↓ 11 callers
Function
is_dict
Test whether the given binding can be considered a dictionary. For this, we check what value might be associated with it through it's initialization,
crates/ruff_python_semantic/src/analyze/typing.rs:1053
↓ 11 callers
Function
is_dunder
(id: &str)
crates/ruff_python_ast/src/helpers.rs:780
↓ 11 callers
Method
is_empty
(&self)
crates/mdtest/src/matcher.rs:52
↓ 11 callers
Method
is_empty
Returns `true` if there are no deferred nodes.
crates/ruff_linter/src/checkers/ast/deferred.rs:20
↓ 11 callers
Method
is_future_import
Returns `true` if this import statement is a `__future__` import for the given Python version. In Python < 3.13, relative imports from `.__future__`
crates/ruff_python_ast/src/nodes.rs:56
↓ 11 callers
Function
is_keyword_only_argument_non_default
(arguments: &Arguments, name: &str)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:9
↓ 11 callers
Method
is_local
Is the symbol defined in this scope, vs referring to some enclosing scope? There are three common cases where a name refers to an enclosing scope: 1
crates/ty_python_core/src/symbol.rs:123
↓ 11 callers
Method
is_nonlocal
Is the symbol `nonlocal` its containing scope?
crates/ty_python_core/src/symbol.rs:86
↓ 11 callers
Method
is_read_only
(&self)
crates/ty_python_semantic/src/types/class.rs:2823
↓ 11 callers
Method
is_trivially_always_satisfied
Returns `true` if this constraint set's root is the `always` terminal. This is only a cheap sufficient check. A nonterminal constraint set can also b
crates/ty_python_semantic/src/types/constraints.rs:307
↓ 11 callers
Method
is_vendored_path
(&self)
crates/ruff_db/src/files/path.rs:58
↓ 11 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1760
↓ 11 callers
Method
join
Combine occurrences without discarding symbolic dependencies at `Invariant`. Only evaluation can short-circuit there: later terms can still connect a
crates/ty_python_semantic/src/types/variance/equations.rs:46
↓ 11 callers
Method
join_comma_separated
( &'fmt mut self, sequence_end: TextSize, )
crates/ruff_python_formatter/src/builders.rs:75
↓ 11 callers
Method
join_with
Joins the objects by placing the specified separator between every two items. ## Examples Joining different tokens by separating them with a comma a
crates/ruff_formatter/src/formatter.rs:110
↓ 11 callers
Method
kind
(&self)
crates/ruff_db/src/vendored.rs:313
↓ 11 callers
Method
kind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:328
↓ 11 callers
Method
last_component
(&self)
crates/ty_module_resolver/src/module_name.rs:114
↓ 11 callers
Method
leading_dangling_trailing
Returns an iterator over the [leading](self#leading-comments), [dangling](self#dangling-comments), and [trailing](self#trailing) comments of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:364
↓ 11 callers
Method
len
(&self)
crates/ty_project/src/files.rs:215
↓ 11 callers
Method
line_end
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:67
↓ 11 callers
Method
mark_formatted
Marks the comment as formatted
crates/ruff_python_formatter/src/comments/mod.rs:146
↓ 11 callers
Method
member_lookup_with_policy_and_receiver
Perform member lookup while optionally binding descriptors and `Self` to a more precise receiver than the type whose members are being searched. Inte
crates/ty_python_semantic/src/types.rs:6049
↓ 11 callers
Method
name
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:892
↓ 11 callers
Method
next
(&mut self)
crates/ruff_python_trivia/src/tokenizer.rs:801
↓ 11 callers
Method
normalize_path
(&self, path: &'a SystemPath)
crates/ty_test/src/db.rs:489
↓ 11 callers
Method
parameter_documentation
Extract parameter documentation from popular docstring formats. Returns a map of parameter names to their documentation.
crates/ty_ide/src/docstring.rs:39
↓ 11 callers
Method
parent_statement_id
Given a [`NodeId`], return the [`NodeId`] of the parent statement, if any.
crates/ruff_python_semantic/src/model.rs:1677
↓ 11 callers
Function
parenthesized
Formats `content` enclosed by the `left` and `right` parentheses. The implementation also ensures that expanding the parenthesized expression (or any
crates/ruff_python_formatter/src/expression/parentheses.rs:109
↓ 11 callers
Method
partition
(self)
crates/ruff/src/args.rs:90
↓ 11 callers
Method
path
The full path that this entry represents.
crates/ruff_db/src/system/walk_directory.rs:172
↓ 11 callers
Method
quote
(&self)
crates/ruff_python_codegen/src/stylist.rs:23
↓ 11 callers
Method
range
(&self)
crates/ty_project/src/metadata/value.rs:60
↓ 11 callers
Method
range
(&self)
crates/ruff_python_parser/src/semantic_errors.rs:1568
↓ 11 callers
Method
restore
Restore the semantic model to the given [`Snapshot`].
crates/ruff_python_semantic/src/model.rs:2094
↓ 11 callers
Method
reverse
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1391
↓ 11 callers
Method
rules
Return the rules in this category.
crates/ruff_linter/src/codes.rs:185
↓ 11 callers
Method
run
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:34
↓ 11 callers
Method
settings
(&self)
crates/ty_test/src/db.rs:57
↓ 11 callers
Method
severity
Returns the severity of this diagnostic. Note that this may be different than the severity of sub-diagnostics.
crates/ruff_db/src/diagnostic/mod.rs:288
↓ 11 callers
Method
show_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ruff_server/src/session/client.rs:198
↓ 11 callers
Method
signature
(&self, db: &'db dyn Db, signature: &Signature<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:155
↓ 11 callers
Method
slice
Returns the location of the comment in the original source code. Allows retrieving the text of the comment.
crates/ruff_python_formatter/src/comments/mod.rs:137
↓ 11 callers
Function
source_text_slice
Emits a text as it is written in the source document. Optimized to avoid allocations.
crates/ruff_formatter/src/builders.rs:376
← previous
next →
1,401–1,500 of 31,766, ranked by callers