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
↓ 19 callers
Method
sub
(mut self, sub: SubDiagnostic)
crates/ty_project/src/metadata/options.rs:2609
↓ 19 callers
Method
target
(self, db: &'db dyn Db, parsed: &'ast ParsedModuleRef)
crates/ty_python_core/src/unpack.rs:69
↓ 19 callers
Method
to_search_paths
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_module_resolver/src/settings.rs:55
↓ 19 callers
Function
trailing
()
crates/ruff_python_formatter/src/comments/map.rs:645
↓ 19 callers
Method
visit_body
(&mut self, body: &'db [ast::Stmt])
crates/ty_ide/src/symbols.rs:837
↓ 19 callers
Function
walk_stmt
(visitor: &mut V, stmt: &'a Stmt)
crates/ruff_python_ast/src/visitor.rs:135
↓ 19 callers
Method
workspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1563
↓ 19 callers
Method
write_file
( &self, path: impl AsRef<SystemPath>, content: impl AsRef<str>, )
crates/ty_server/tests/e2e/main.rs:860
↓ 18 callers
Method
add_negative
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1749
↓ 18 callers
Method
add_negative_in_place
(&mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1763
↓ 18 callers
Method
ancestor_scopes
Returns the scopes enclosing `node`, starting with the scope containing the node itself. Like [`Self::scope`], this handles nodes inside string annot
crates/ty_python_semantic/src/semantic_model.rs:450
↓ 18 callers
Method
append
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__regression.py:109
↓ 18 callers
Method
as_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:399
↓ 18 callers
Method
as_str
(self)
crates/ty_module_resolver/src/module.rs:296
↓ 18 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/private_type_parameter.rs:82
↓ 18 callers
Function
assert_file_diagnostics
(db: &TestDb, filename: &str, expected: &[&str])
crates/ty_python_semantic/src/types/infer/tests.rs:73
↓ 18 callers
Method
binding_id
Returns the [`BindingId`] if this symbol resolves to a concrete binding.
crates/ruff_python_semantic/src/model.rs:45
↓ 18 callers
Method
child_scopes
Returns an iterator over the direct child scopes of `scope`.
crates/ty_python_core/src/lib.rs:657
↓ 18 callers
Method
contains
(&self, key: &K)
crates/ty_python_core/src/frozen.rs:287
↓ 18 callers
Method
contents
Return the underlying source code.
crates/ruff_linter/src/locator.rs:106
↓ 18 callers
Method
enter_node
(&mut self, node: T)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:205
↓ 18 callers
Method
exit_node
(&mut self)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:213
↓ 18 callers
Method
explicit_extra_items
Returns extra items only when they were explicitly declared. An implicitly open `TypedDict` returns `None` here because its hidden items are not dire
crates/ty_python_semantic/src/types/typed_dict.rs:99
↓ 18 callers
Method
finish
(&mut self)
crates/ruff_db/src/display.rs:38
↓ 18 callers
Method
first_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1198
↓ 18 callers
Method
has_leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:290
↓ 18 callers
Method
identity_specialization
Returns a specialization of this class where each typevar is mapped to itself.
crates/ty_python_semantic/src/types/class/static_literal.rs:690
↓ 18 callers
Method
into_iter
(self)
crates/ty_site_packages/src/lib.rs:268
↓ 18 callers
Method
into_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:31
↓ 18 callers
Method
is_empty
(&self)
crates/ty_python_core/src/rank.rs:73
↓ 18 callers
Method
is_ipynb
(self)
crates/ruff_python_ast/src/lib.rs:153
↓ 18 callers
Method
is_literal_expr
Returns `true` if the expression is a literal expression. A literal expression is either a string literal, bytes literal, integer, float, complex num
crates/ruff_python_ast/src/nodes.rs:63
↓ 18 callers
Method
is_triple_quoted
Returns `true` if the current f-string is a triple-quoted f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:75
↓ 18 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:814
↓ 18 callers
Method
join_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:371
↓ 18 callers
Method
line
Set the default line number to display
crates/ruff_annotate_snippets/src/snippet.rs:558
↓ 18 callers
Method
next
(&mut self)
crates/ruff_db/src/system/path.rs:993
↓ 18 callers
Method
or_recursively_defined
Preserve recursion from both the source union and any transformed elements already added.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:746
↓ 18 callers
Method
p
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 callers
Method
recursively_defined
(self)
crates/ty_python_semantic/src/types/literal.rs:59
↓ 18 callers
Method
return_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call.rs:378
↓ 18 callers
Method
variance_of
( self, db: &'db dyn Db, _: &ProgramEnvironment<'db>, typevar: BoundTypeVarIde
crates/ty_python_semantic/src/types/class/static_literal.rs:3577
↓ 18 callers
Method
when_any
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:217
↓ 18 callers
Method
with_files
Write multiple files to the test directory
crates/ty_server/tests/e2e/main.rs:1638
↓ 17 callers
Method
analysis_settings
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:199
↓ 17 callers
Function
any_over_type_expanding_aliases
Searches through type aliases without forcing other lazily inferred type attributes. Revisiting a recursive alias counts as a match because its speci
crates/ty_python_semantic/src/types/visitor.rs:1094
↓ 17 callers
Method
apply_uv_workspace
Applies a previously obtained uv workspace without invoking uv or checking [`Self::use_uv`]. An explicit ty configuration keeps its root; otherwise u
crates/ty_project/src/metadata.rs:231
↓ 17 callers
Method
as_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:189
↓ 17 callers
Method
as_path
(&self)
crates/ty_module_resolver/src/path.rs:811
↓ 17 callers
Method
as_str
(self)
crates/ruff_linter/src/docstrings/mod.rs:99
↓ 17 callers
Method
as_system
(&self)
crates/ty_test/src/db.rs:467
↓ 17 callers
Method
as_union
(self)
crates/ty_python_semantic/src/types.rs:3271
↓ 17 callers
Method
char_column
Set the default column to display <div class="warning"> `char_column` is only be respected if [`Origin::line`] is also set. </div>
crates/ruff_annotate_snippets/src/snippet.rs:570
↓ 17 callers
Function
check_os_pathlib_single_arg_calls
We check functions that take only 1 argument, this does not apply to functions with `dir_fd` argument, because `dir_fd` is not supported by pathlib,
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:53
↓ 17 callers
Method
completion_request
Sends a `textDocument/completion` request for the document at the given URI and position.
crates/ty_server/tests/e2e/main.rs:1127
↓ 17 callers
Function
covering_node
Returns the node with a minimal range that fully contains `range`. If `range` is empty and falls within a parser *synthesized* node generated during
crates/ruff_python_ast/src/find_node.rs:14
↓ 17 callers
Function
create_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:26
↓ 17 callers
Method
definitions
Gets the definitions for this goto target. The `alias_resolution` parameter controls whether import aliases (i.e. "x" in "from a import b as x") are
crates/ty_ide/src/goto.rs:649
↓ 17 callers
Function
delete_stmt
Return the [`Edit`] to use when deleting a [`Stmt`]. In some cases, this is as simple as deleting the [`TextRange`] of the [`Stmt`] itself. However,
crates/ruff_linter/src/fix/edits.rs:39
↓ 17 callers
Method
end_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1358
↓ 17 callers
Method
entry
(&self, source: &str)
crates/ty_project/src/baseline.rs:410
↓ 17 callers
Method
format
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callers
Method
id
Returns the identifier for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:223
↓ 17 callers
Method
identity_specialization
Returns the identity specialization for this class (same as default for non-generic).
crates/ty_python_semantic/src/types/class.rs:813
↓ 17 callers
Method
ignore_conflicting_declarations
(self)
crates/ty_python_semantic/src/place.rs:1050
↓ 17 callers
Method
in_range
Returns a slice of [`Token`] that are within the given `range`. The start and end offset of the given range should be either: 1. Token boundary 2. Ga
crates/ruff_python_ast/src/token/tokens.rs:82
↓ 17 callers
Method
in_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:429
↓ 17 callers
Method
inference_flags
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:12636
↓ 17 callers
Method
intersect
Return a new tuple-spec builder that reflects the intersection of this tuple and another tuple, or `None` if the intersection is impossible (e.g., two
crates/ty_python_semantic/src/types/tuple.rs:3203
↓ 17 callers
Method
is_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callers
Method
is_eof
(self)
crates/ruff_python_ast/src/token.rs:330
↓ 17 callers
Method
len
Returns the number of rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; assert_eq!(RuleSet::empty().len(), 0); as
crates/ruff_linter/src/registry/rule_set.rs:177
↓ 17 callers
Method
lower
(cls, my_field: str)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N805.py:30
↓ 17 callers
Method
node
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1198
↓ 17 callers
Method
node_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callers
Function
place_from_declarations
Build a declared type from a [`DeclarationsIterator`]. If there is only one declaration, or all declarations declare the same type, returns `Ok(..)`.
crates/ty_python_semantic/src/place.rs:856
↓ 17 callers
Method
place_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:292
↓ 17 callers
Function
program_file
(db: &TestDb, file: File)
crates/ty_python_semantic/src/types/infer/tests.rs:29
↓ 17 callers
Method
range
(&self)
crates/ty_ide/src/semantic_tokens.rs:168
↓ 17 callers
Method
remaining_literal_union
Expand this complement to the union of enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:791
↓ 17 callers
Method
resize
Resizes this tuple to a different length, if possible. If this tuple cannot satisfy the desired minimum or maximum length, we return an error. If we r
crates/ty_python_semantic/src/types/tuple.rs:2660
↓ 17 callers
Method
rest
Returns the remaining text to lex. Use [`Cursor::text_len`] to get the length of the remaining text.
crates/ruff_python_parser/src/lexer/cursor.rs:57
↓ 17 callers
Method
return_type
(&self)
crates/ty_python_semantic/src/types/infer/builder/class.rs:36
↓ 17 callers
Method
set_override_options
Sets the highest-precedence options for this project, replacing any previous overrides.
crates/ty_project/src/metadata.rs:434
↓ 17 callers
Function
site_packages_directories_from_sys_prefix
Attempt to retrieve the `site-packages` directories associated with a given Python installation. The location of the `site-packages` directories can
crates/ty_site_packages/src/lib.rs:1669
↓ 17 callers
Method
snapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
↓ 17 callers
Method
span
Create a span with the range of the given expression in the file being currently type checked. If you're creating a diagnostic with snippets in files
crates/ty_python_semantic/src/types/context.rs:232
↓ 17 callers
Method
term_width
Set the width to render within Affects the rendering of [`Snippet`][crate::Snippet]s
crates/ruff_annotate_snippets/src/renderer/mod.rs:170
↓ 17 callers
Method
to_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1575
↓ 17 callers
Method
trim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:113
↓ 17 callers
Function
unbound
()
crates/ty_python_core/src/use_def/place_state.rs:834
↓ 17 callers
Method
values
Returns an iterator over the fixes in the map.
crates/ruff/src/diagnostics.rs:146
↓ 17 callers
Method
with_failure_code
(self, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:388
↓ 17 callers
Method
with_file
Write a file to the test directory
crates/ruff_server/tests/e2e/main.rs:1123
↓ 17 callers
Method
with_qualifiers
(self, qualifiers: TypeQualifiers)
crates/ty_python_semantic/src/place.rs:335
↓ 16 callers
Method
all
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:83
↓ 16 callers
Method
as_code
Access the resulting code, borrowing the result
crates/ruff_formatter/src/lib.rs:414
↓ 16 callers
Method
as_function_def
Return the [`ast::StmtFunctionDef`] of the definition, if it's a function definition.
crates/ruff_python_semantic/src/definition.rs:174
↓ 16 callers
Method
as_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1226
↓ 16 callers
Method
as_str
Returns the underlying package name.
crates/ty_project/src/metadata/pyproject.rs:258
← previous
next →
901–1,000 of 31,562, ranked by callers