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
↓ 12 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:559
↓ 12 callers
Method
color
Whether to enable colors or not.
crates/ruff_db/src/diagnostic/mod.rs:1479
↓ 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:1930
↓ 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:674
↓ 12 callers
Method
deprecated
Returns the deprecated info if this class is deprecated.
crates/ty_python_semantic/src/types/class.rs:895
↓ 12 callers
Method
did_change_watched_files
Send a `workspace/didChangeWatchedFiles` notification with the given file events
crates/ty_server/tests/e2e/main.rs:949
↓ 12 callers
Function
enum_metadata
( db: &'db dyn Db, class: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types/enums.rs:1005
↓ 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:2882
↓ 12 callers
Method
expression_scope_id
(&self, expression: &E)
crates/ty_python_core/src/lib.rs:429
↓ 12 callers
Method
file
The file to the source code that defines this module This is `None` for namespace packages.
crates/ty_module_resolver/src/module.rs:75
↓ 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:1087
↓ 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:882
↓ 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:2313
↓ 12 callers
Method
into_iter
(self)
crates/ruff_python_ast/src/nodes.rs:283
↓ 12 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/signatures.rs:664
↓ 12 callers
Method
into_regular
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:916
↓ 12 callers
Method
is_bound
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12920
↓ 12 callers
Method
is_divergent
(&self)
crates/ty_python_semantic/src/types.rs:2490
↓ 12 callers
Method
is_implicitly_open
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:121
↓ 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_read_only
(&self)
crates/ty_python_semantic/src/types/class.rs:2808
↓ 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:612
↓ 12 callers
Method
is_union
(self)
crates/ty_python_semantic/src/types.rs:3267
↓ 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:501
↓ 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:721
↓ 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:608
↓ 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
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:6331
↓ 12 callers
Method
next
(&mut self)
crates/ty_project/src/lib.rs:1105
↓ 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:1637
↓ 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
parent
(&self)
crates/ty_module_resolver/src/module_name.rs:134
↓ 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:1168
↓ 12 callers
Method
raw_value_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:251
↓ 12 callers
Method
reachable_bindings
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/use_def.rs:1244
↓ 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
Sets the indexed files of a package to `files`.
crates/ty_project/src/files.rs:147
↓ 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
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:285
↓ 12 callers
Method
specialize
Creates a specialization of this generic context. Panics if the length of `types` does not match the number of typevars in the generic context. You m
crates/ty_python_semantic/src/types/generics.rs:1026
↓ 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:12718
↓ 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:922
↓ 12 callers
Method
to_meta_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:9397
↓ 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
union
Return a new tuple-spec builder that reflects the union of this tuple and another tuple. For example, if `self` is a tuple-spec builder for `tuple[Li
crates/ty_python_semantic/src/types/tuple.rs:3152
↓ 12 callers
Method
update
Update the notebook with the given sourcemap and transformed content.
crates/ruff_notebook/src/notebook.rs:437
↓ 12 callers
Function
uv_test_env_vars
()
crates/ty_project/src/uv.rs:83
↓ 12 callers
Method
verify_builder
(self, builder: &'c ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/constraints.rs:529
↓ 12 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/visitor.rs:535
↓ 12 callers
Method
with_definition
Create a new signature with the given definition.
crates/ty_python_semantic/src/types/signatures.rs:2505
↓ 12 callers
Method
with_filter
(mut self, pattern: &str, replacement: &str)
crates/ty/tests/common/mod.rs:95
↓ 12 callers
Function
workspace_case
()
crates/ty/tests/cli/uv_workspace.rs:18
↓ 12 callers
Method
write
(&self, f: &mut std::fmt::Formatter)
crates/ruff_db/src/diagnostic/render/full.rs:117
↓ 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:4510
↓ 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:321
↓ 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_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:1497
↓ 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
← previous
next →
1,301–1,400 of 31,562, ranked by callers