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
↓ 13 callers
Method
with_extension
(&self, extension: &str)
crates/ruff_db/src/system/path.rs:379
↓ 12 callers
Method
add_atom
(&mut self, predicate: ScopedPredicateId)
crates/ty_python_core/src/narrowing_constraints.rs:238
↓ 12 callers
Method
as_bytes
(&self)
crates/ruff_db/src/vendored.rs:411
↓ 12 callers
Method
as_char
(self)
crates/ruff_python_ast/src/str.rs:20
↓ 12 callers
Method
as_str
(&self)
crates/ruff_db/src/diagnostic/mod.rs:914
↓ 12 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/refurb/rules/sorted_min_max.rs:220
↓ 12 callers
Method
as_u32
(self)
crates/ty_python_core/src/reachability_constraints.rs:109
↓ 12 callers
Function
assert_example
(target: &str, expected: snapbox::Data)
crates/ruff_annotate_snippets/tests/examples.rs:88
↓ 12 callers
Function
assert_function_query_was_run
Assert that the Salsa query described by the generic parameter `C` was executed at least once with the input `input` in the history span represented b
crates/ruff_db/src/testing.rs:86
↓ 12 callers
Method
binary_search
(&self, value: &T)
crates/ruff_index/src/slice.rs:121
↓ 12 callers
Method
bindings
(&self)
crates/ty_python_core/src/use_def/place_state.rs:763
↓ 12 callers
Method
bool
Resolves the boolean value of the type and falls back to [`Truthiness::Ambiguous`] if the type doesn't implement `__bool__` correctly. This method sh
crates/ty_python_semantic/src/types/bool.rs:25
↓ 12 callers
Method
build
(self)
crates/ruff_db/src/testing.rs:202
↓ 12 callers
Method
build_inference_with
Build correlated type-variable inference, preserving missing evidence and incomplete solutions. The hook must retain whether an override is only a fal
crates/ty_python_semantic/src/types/generics.rs:2916
↓ 12 callers
Method
callable_type
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1520
↓ 12 callers
Method
change_workspace_folders
Send a `workspace/didChangeWorkspaceFolders` notification with the given added/removed workspace folders. The paths provided should be paths to the ro
crates/ty_server/tests/e2e/main.rs:968
↓ 12 callers
Method
chars
(&self)
crates/ruff_python_trivia/src/cursor.rs:33
↓ 12 callers
Method
collect_vec
Walks the project paths and collects the paths of all files that are included in the project. The file-walk callback uses a cloned database. Salsa qu
crates/ty_project/src/walk.rs:158
↓ 12 callers
Method
color
Whether to enable colors or not.
crates/ruff_db/src/diagnostic/mod.rs:1450
↓ 12 callers
Method
concat
(slices: &[T])
crates/ruff_python_ast/src/name.rs:80
↓ 12 callers
Method
content
Returns the new content for an insertion or deletion.
crates/ruff_diagnostics/src/edit.rs:61
↓ 12 callers
Method
content_range
The range of the string literal's contents. This excludes any prefixes, opening quotes or closing quotes.
crates/ruff_python_ast/src/nodes.rs:1943
↓ 12 callers
Method
create
Creates a new, empty virtual environment.
scripts/ty_benchmark/src/benchmark/venv.py:55
↓ 12 callers
Method
current_place_table_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1073
↓ 12 callers
Method
default_specialization
Returns the default specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we re
crates/ty_python_semantic/src/types/class/static_literal.rs:673
↓ 12 callers
Method
definitions
Returns the definitions found for the name.
crates/ty_python_semantic/src/place/definitions.rs:161
↓ 12 callers
Method
deprecated
Returns the deprecated info if this class is deprecated.
crates/ty_python_semantic/src/types/class.rs:914
↓ 12 callers
Function
directory_listing
( db: &'db dyn Db, path: &SystemPath, )
crates/ruff_db/src/files/directory.rs:94
↓ 12 callers
Function
enum_metadata
( db: &'db dyn Db, class: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types/enums.rs:1008
↓ 12 callers
Method
exists
Returns a new BDD that is the _existential abstraction_ of `self` for a set of typevars. The result will return true whenever `self` returns true for
crates/ty_python_semantic/src/types/constraints.rs:2843
↓ 12 callers
Method
expression_scope_id
(&self, expression: &E)
crates/ty_python_core/src/lib.rs:429
↓ 12 callers
Method
first
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the position is past the end of the file.
crates/ruff_python_parser/src/lexer/cursor.rs:42
↓ 12 callers
Function
format
(root: &dyn Format<SimpleFormatContext>)
crates/ruff_formatter/src/printer/mod.rs:1678
↓ 12 callers
Function
format_module_source
( source: &str, options: PyFormatOptions, )
crates/ruff_python_formatter/src/lib.rs:142
↓ 12 callers
Method
freshness
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1092
↓ 12 callers
Function
get_assertions
(source: &str)
crates/mdtest/src/assertion.rs:547
↓ 12 callers
Method
get_span
Returns the `Span` associated with this annotation.
crates/ruff_db/src/diagnostic/mod.rs:853
↓ 12 callers
Method
header_range
Returns the range of the `TypedDict` call expression.
crates/ty_python_semantic/src/types/class/typed_dict.rs:949
↓ 12 callers
Method
infer_definition
(&mut self, node: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy)
crates/ty_python_semantic/src/types/infer/builder.rs:2333
↓ 12 callers
Method
into_iter
(self)
crates/ruff_python_ast/src/nodes.rs:296
↓ 12 callers
Method
into_regular
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:916
↓ 12 callers
Method
is_divergent
(&self)
crates/ty_python_semantic/src/types.rs:2489
↓ 12 callers
Method
is_implicitly_open
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:122
↓ 12 callers
Method
is_loop_header
(&self)
crates/ty_python_core/src/definition.rs:1015
↓ 12 callers
Method
is_overload
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/function.rs:357
↓ 12 callers
Method
is_standard_library
(&self)
crates/ty_module_resolver/src/path.rs:701
↓ 12 callers
Function
is_stub
Returns `true` if a function has an empty body, and is therefore a stub. A function body is considered to be empty if it contains only `pass` stateme
crates/ruff_python_semantic/src/analyze/function_type.rs:165
↓ 12 callers
Method
is_trivially_never_satisfied
Returns whether this constraint set is the `never` terminal. A nonterminal constraint set can also never be satisfied, so `false` does not prove that
crates/ty_python_semantic/src/types/constraints.rs:608
↓ 12 callers
Method
items
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/typed_dict.rs:966
↓ 12 callers
Method
iter
Returns an iterator over every symbol along with its ID.
crates/ty_ide/src/symbols.rs:146
↓ 12 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:516
↓ 12 callers
Method
iter_overloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:975
↓ 12 callers
Method
join
(mut self)
crates/ruff_server/src/server/schedule/thread.rs:88
↓ 12 callers
Method
keys
(self)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM118.py:42
↓ 12 callers
Method
known
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:214
↓ 12 callers
Function
known_module_symbol
Lookup the type of `symbol` in a given known module. Returns `Place::Undefined` if the given known module cannot be resolved for some reason.
crates/ty_python_semantic/src/place.rs:722
↓ 12 callers
Method
len
(&self)
crates/ruff_server/src/server/schedule/thread/pool.rs:130
↓ 12 callers
Method
line_range
Returns the [`TextRange`] of the `line` with the given index. The start points to the first character's [byte offset](TextSize), the end up to, and in
crates/ruff_source_file/src/line_index.rs:312
↓ 12 callers
Method
literals
Returns an iterator over the [`StringLiteral`] parts contained in this value. Note that this doesn't recurse into the f-string parts. For example, `
crates/ruff_python_ast/src/nodes.rs:621
↓ 12 callers
Function
match_call_mut
( expression: &'a mut Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:77
↓ 12 callers
Function
match_expression
Given the source code for an expression, return the parsed [`Expression`]. If the expression is not guaranteed to be valid as a standalone expression
crates/ruff_linter/src/cst/matchers.rs:231
↓ 12 callers
Method
matches
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/infer/builder.rs:456
↓ 12 callers
Method
materialize
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, kind: MaterializationK
crates/ty_python_semantic/src/types/class_base.rs:460
↓ 12 callers
Method
merged_specialization
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:6448
↓ 12 callers
Method
next
(&mut self)
crates/ty_project/src/lib.rs:1116
↓ 12 callers
Method
next
(&mut self)
crates/ruff_python_semantic/src/analyze/class.rs:99
↓ 12 callers
Method
next_back
(&mut self)
crates/ty_python_semantic/src/types/mro.rs:718
↓ 12 callers
Method
notebook_or_file_path
Returns the document's path, or its containing notebook's path for a cell.
crates/ty_server/src/session.rs:1665
↓ 12 callers
Method
offset
(self)
crates/ty_python_core/src/member.rs:748
↓ 12 callers
Method
open_file
(&mut self, path: &str, contents: &str)
crates/ty_wasm/src/lib.rs:189
↓ 12 callers
Method
or_fall_back_to
Fallback (wholly or partially) to `fallback` to create a new [`LookupResult`].
crates/ty_python_semantic/src/place.rs:437
↓ 12 callers
Method
parent
(&self)
crates/ty_module_resolver/src/module_name.rs:134
↓ 12 callers
Method
parser_version
Return the [`PythonVersion`] to use for parsing. This will be either the Python version specified by the user or the latest supported version if unse
crates/ruff_linter/src/settings/mod.rs:908
↓ 12 callers
Method
permissions
(&self)
crates/ruff_db/src/system.rs:317
↓ 12 callers
Method
pop
(&mut self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:135
↓ 12 callers
Method
prefix
(self)
crates/ruff_python_ast/src/nodes.rs:1181
↓ 12 callers
Method
raw_value_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:254
↓ 12 callers
Method
reachable_bindings
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/use_def.rs:1244
↓ 12 callers
Method
rendering_sort_key
Returns a key that can be used to sort two diagnostics into the canonical order in which they should appear when rendered.
crates/ruff_db/src/diagnostic/mod.rs:355
↓ 12 callers
Method
resolved_client_capabilities
(&self)
crates/ruff_server/src/session.rs:196
↓ 12 callers
Method
revision
(&self)
crates/ruff_db/src/system.rs:313
↓ 12 callers
Method
second
(&self)
crates/ruff_python_trivia/src/cursor.rs:59
↓ 12 callers
Method
send
(&mut self, message: Message)
crates/ruff_server/tests/e2e/main.rs:320
↓ 12 callers
Method
set_parent
Set the offset of the diagnostic's parent statement.
crates/ruff_db/src/diagnostic/mod.rs:429
↓ 12 callers
Method
speculate_without_diagnostics
Returns a speculative builder that does not construct diagnostics. Note that this method may lead to lost diagnostics if the expression cache is enab
crates/ty_python_semantic/src/types/infer/builder.rs:12867
↓ 12 callers
Method
start
(&self)
crates/ruff_source_file/src/newlines.rs:211
↓ 12 callers
Method
take_snapshot
Creates a document snapshot with the URI referencing the document to snapshot.
crates/ruff_server/src/session.rs:104
↓ 12 callers
Function
test_helper
(source: &str, members_to_remove: &[&str])
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:75
↓ 12 callers
Function
test_resource_path
(path: impl AsRef<Path>)
crates/ruff_linter/src/test.rs:120
↓ 12 callers
Method
text_len
(&self)
crates/ruff_python_parser/src/lexer/cursor.rs:66
↓ 12 callers
Method
to_intersection
Reconstruct the equivalent set-theoretic intersection.
crates/ty_python_semantic/src/types/enums.rs:926
↓ 12 callers
Method
to_meta_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:9457
↓ 12 callers
Method
to_module_path
(&self)
crates/ty_module_resolver/src/path.rs:692
↓ 12 callers
Method
tokens
(&self)
crates/ruff_python_formatter/src/context.rs:85
↓ 12 callers
Method
try_expression_scope_id
Returns the ID of the `expression`'s enclosing scope.
crates/ty_python_core/src/lib.rs:438
↓ 12 callers
Method
update
Update the notebook with the given sourcemap and transformed content.
crates/ruff_notebook/src/notebook.rs:440
↓ 12 callers
Function
uv_test_env_vars
()
crates/ty_project/src/uv.rs:114
↓ 12 callers
Method
variadic
Return the variadic parameter (`*args`), if any, and its index, or `None`.
crates/ty_python_semantic/src/types/signatures.rs:5696
↓ 12 callers
Method
verify_builder
(self, builder: &'c ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/constraints.rs:525
↓ 12 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/visitor.rs:539
← previous
next →
1,301–1,400 of 31,766, ranked by callers