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
↓ 6 callers
Method
raw_signature
Typed internally-visible "raw" signature for this function. That is, the return types of async functions are not wrapped in `CoroutineType[...]`. The
crates/ty_python_semantic/src/types/function.rs:614
↓ 6 callers
Method
reachable_declarations
(&self, place: ScopedPlaceId)
crates/ty_python_core/src/use_def.rs:1390
↓ 6 callers
Method
record
(&self, content: DynamicContent)
crates/ty_python_semantic/src/types/visitor.rs:523
↓ 6 callers
Method
record_binding
Record a binding and update imported qualifiers according to `imported_qualifier_action`. Ordinary bindings preserve imported qualifiers. Imports rep
crates/ty_python_core/src/use_def.rs:2369
↓ 6 callers
Method
record_declaration
Record a newly-encountered declaration for this place.
crates/ty_python_core/src/use_def/place_state.rs:207
↓ 6 callers
Method
record_narrowing_constraint
Adds and records a narrowing constraint for only the places that could possibly be narrowed. Returns the `ScopedPredicateId` for the positive predica
crates/ty_python_core/src/builder.rs:2351
↓ 6 callers
Method
record_reachability_constraint
Record a constraint that affects the reachability of the current position in the semantic index analysis. For example, if we encounter a `if test:` br
crates/ty_python_core/src/builder.rs:2599
↓ 6 callers
Method
reduce_inferable
Reduces the set of inferable typevars for this constraint set. You provide the typevars that were inferable when this constraint set was created, and
crates/ty_python_semantic/src/types/constraints.rs:814
↓ 6 callers
Function
render
(renderer: &Renderer, groups: Report<'_>)
crates/ruff_annotate_snippets/src/renderer/render.rs:29
↓ 6 callers
Method
report
(&mut self, diagnostic: AssignmentAttributeWriteDiagnostic<'db>)
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:1011
↓ 6 callers
Method
report_custom_diagnostic
Return a [`DiagnosticGuard`] for reporting a diagnostic, with its fix title deferred. Prefer [`Checker::report_diagnostic`] unless you need to attach
crates/ruff_linter/src/checkers/ast/mod.rs:485
↓ 6 callers
Method
report_invalid_type_expression
( &self, expression: impl Ranged, message: impl std::fmt::Display, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:258
↓ 6 callers
Method
required
(mut self, yes: bool)
crates/ty_python_semantic/src/types/typed_dict.rs:3334
↓ 6 callers
Function
resolve_module_for_import_from
Resolves the module referenced by a `from` import statement. Returns `None` if the statement does not name a valid module or the module cannot be res
crates/ty_module_resolver/src/resolve.rs:85
↓ 6 callers
Function
resolve_module_query
( db: &'db dyn Db, module_name: ModuleNameIngredient<'db>, )
crates/ty_module_resolver/src/resolve.rs:301
↓ 6 callers
Method
respond
Sends a response to the client for a given request ID. The response isn't sent immediately. Instead, it's queued up in the main loop and checked for
crates/ty_server/src/session/client.rs:156
↓ 6 callers
Method
result_from_equality
(self, equal: bool)
crates/ty_python_semantic/src/types/equality.rs:1876
↓ 6 callers
Method
return_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:330
↓ 6 callers
Method
scope
Returns the scope in which `node` is defined (handles string annotations).
crates/ty_python_semantic/src/semantic_model.rs:399
↓ 6 callers
Function
script
(db: &dyn Db, file: File)
crates/ty_project/src/script.rs:89
↓ 6 callers
Method
scripts_to_synchronize
Returns the scripts whose uv environments need preparing at startup or after a reload.
crates/ty_project/src/lib.rs:841
↓ 6 callers
Function
section_block
(items: Vec<SectionItem>)
crates/ty_ide/src/docstring/markdown/structured.rs:1057
↓ 6 callers
Method
section_name
The name of the section as it appears in the docstring, e.g. "Args" or "Returns".
crates/ruff_linter/src/docstrings/sections.rs:335
↓ 6 callers
Method
section_name_range
The absolute range of the section name
crates/ruff_linter/src/docstrings/sections.rs:349
↓ 6 callers
Method
segments
(&self)
crates/ty_python_core/src/member.rs:186
↓ 6 callers
Function
send_workspace_diagnostic_request
Sends a workspace diagnostic request to the server. Unlike [`TestServer::workspace_diagnostic_request`], this function does not wait for the response
crates/ty_server/tests/e2e/pull_diagnostics.rs:1582
↓ 6 callers
Method
set_included_paths
(&mut self, paths: Vec<SystemPathBuf>)
crates/ty/tests/file_watching.rs:436
↓ 6 callers
Method
setup_expression_cache
Setup a shared expression cache for multi-inference. Returns `false` if the expression cache was already initialized.
crates/ty_python_semantic/src/types/infer/builder.rs:1023
↓ 6 callers
Method
size_hint
Returns the minimum and maximum length of this tuple. (The maximum length will be `None` for a tuple with a variable-length portion.)
crates/ty_python_semantic/src/types/tuple.rs:60
↓ 6 callers
Method
solutions_with
Computes solutions using a caller-provided selector within the given projection budget. The selector receives the typevar's variance and explicit low
crates/ty_python_semantic/src/types/constraints/projection.rs:147
↓ 6 callers
Method
source_overload_index_raw
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2544
↓ 6 callers
Method
spawn
(self, f: F)
crates/ruff_server/src/server/schedule/thread.rs:62
↓ 6 callers
Method
src
(&self)
crates/ty_project/src/metadata/settings.rs:53
↓ 6 callers
Method
stack_size
(self, size: usize)
crates/ty_server/src/server/schedule/thread.rs:55
↓ 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:669
↓ 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:1032
↓ 6 callers
Function
test_db
(files: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:2454
↓ 6 callers
Function
test_directory
(dirname: &str)
crates/ruff_db/src/vendored.rs:589
↓ 6 callers
Method
to_diagnostic
(&self, severity: Severity, headline: &str)
crates/ty_project/src/uv/metadata.rs:146
↓ 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:1561
↓ 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
try_mro_ancestors
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/class.rs:559
↓ 6 callers
Method
ty
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1377
↓ 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:824
↓ 6 callers
Method
unpack
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/arguments.rs:416
↓ 6 callers
Method
unspecialized
Returns the alias without an applied specialization or pending materialization.
crates/ty_python_semantic/src/types/type_alias.rs:690
↓ 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:866
↓ 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:344
↓ 6 callers
Method
uri
Returns the document URI supplied by the client.
crates/ty_server/src/session.rs:1657
↓ 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:931
↓ 6 callers
Method
visit_guarded
( &self, db: &'db dyn Db, ty: Type<'db>, visit_arguments: impl
crates/ty_python_semantic/src/types/visitor.rs:709
↓ 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:219
↓ 6 callers
Method
visit_pattern
(&mut self, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:84
↓ 6 callers
Function
walk_comprehension
( visitor: &mut V, comprehension: &'a Comprehension, )
crates/ruff_python_ast/src/visitor.rs:633
↓ 6 callers
Function
walk_non_atomic_type
( db: &'db dyn Db, non_atomic_type: NonAtomicType<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/visitor.rs:288
↓ 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:511
↓ 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:1117
↓ 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:169
↓ 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
Function
will_rename_files
Computes source edits for a batch of Python file and package directory renames. The following types of rename request are not yet supported: - A req
crates/ty_ide/src/will_rename.rs:160
↓ 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:1526
↓ 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:185
↓ 6 callers
Method
with_raw_initialization_options
Set raw initialization JSON for malformed or startup-only settings.
crates/ty_server/tests/e2e/main.rs:1354
↓ 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:757
↓ 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:654
↓ 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:66
↓ 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
← previous
next →
2,501–2,600 of 31,766, ranked by callers