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
↓ 57 callers
Method
expect_single_definition
( &self, definition_key: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy, )
crates/ty_python_core/src/lib.rs:717
↓ 57 callers
Method
help
Adds a "help" sub-diagnostic with the given message. See the closely related [`Diagnostic::info`] method for more details.
crates/ruff_db/src/diagnostic/mod.rs:190
↓ 57 callers
Method
into_iter
(self)
crates/ruff_index/src/vec.rs:141
↓ 57 callers
Method
iter
(&self)
crates/ruff_python_semantic/src/globals.rs:55
↓ 57 callers
Method
keys
(&self)
crates/ruff_python_formatter/src/comments/map.rs:213
↓ 57 callers
Method
max
(self, other: Self)
crates/ty_python_semantic/src/place.rs:48
↓ 57 callers
Method
name
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:9912
↓ 57 callers
Method
or_else
Chains the placement with the given function. Returns `self` when the placement is non-[`CommentPlacement::Default`]. Otherwise, calls the function w
crates/ruff_python_formatter/src/comments/visitor.rs:507
↓ 57 callers
Function
string_literal
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:11
↓ 56 callers
Method
join
(slices: &[T], separator: &str)
crates/ruff_python_ast/src/name.rs:91
↓ 56 callers
Method
name
(self)
crates/ty_python_semantic/src/types/class.rs:321
↓ 56 callers
Method
report_diagnostic_if_enabled
Return a [`DiagnosticGuard`] for reporting a diagnostic if the corresponding rule is enabled. The guard derefs to a [`Diagnostic`], so it can be used
crates/ruff_linter/src/checkers/ast/mod.rs:468
↓ 56 callers
Method
unfold
Substitute closed types for references before exposing the body. Report whether unfolding returns exactly `Type::Recursive(self)`. An unfolded type c
crates/ty_python_semantic/src/types/recursive.rs:530
↓ 55 callers
Function
benchmark_micro_case
(criterion: &mut Criterion, name: &str, code: &str)
crates/ruff_benchmark/benches/ty.rs:211
↓ 55 callers
Method
extend
Extend the module imports with additional file paths.
crates/ruff_graph/src/lib.rs:72
↓ 55 callers
Method
file
Returns the file containing the class definition.
crates/ty_python_semantic/src/types/class.rs:860
↓ 55 callers
Method
first
(&self)
crates/ruff_python_trivia/src/cursor.rs:52
↓ 55 callers
Method
map
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind.rs:456
↓ 55 callers
Method
specialization
(specialization: Specialization<'db>)
crates/ty_python_semantic/src/types/generics.rs:2321
↓ 55 callers
Function
walk_expr
(visitor: &mut V, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:362
↓ 55 callers
Method
with_src_files
Specify files to be created in the `src` mock directory
crates/ty_module_resolver/src/testing.rs:132
↓ 55 callers
Method
write_file
( &mut self, path: impl AsRef<SystemPath>, content: &str, )
crates/ty_ide/src/lib.rs:448
↓ 54 callers
Method
build
( mut storage: ConstraintSetStorage<'_>, root: InteriorNode, source_order: SourceOrder
crates/ty_python_semantic/src/types/constraints/owned.rs:23
↓ 54 callers
Method
file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:917
↓ 54 callers
Method
items
Bug in Clippy? Sizeof Arguments is 16
crates/ruff_formatter/src/arguments.rs:65
↓ 54 callers
Method
len
Returns the number of module imports.
crates/ruff_graph/src/lib.rs:82
↓ 54 callers
Method
origin
()
crates/ty_python_semantic/src/types/constraints/paths.rs:153
↓ 53 callers
Method
as_string_literal
(self)
crates/ty_python_semantic/src/types.rs:3316
↓ 53 callers
Method
file_uri
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:852
↓ 53 callers
Method
get
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3782
↓ 53 callers
Method
peek
Returns the next [`Token`] in the iterator without consuming it.
crates/ruff_python_ast/src/token/tokens.rs:378
↓ 52 callers
Method
len
Returns the total number of symbols in this collection.
crates/ty_ide/src/symbols.rs:141
↓ 52 callers
Method
statement
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/model.rs:1623
↓ 52 callers
Method
stop_watch
(&mut self, matcher: M)
crates/ty/tests/file_watching.rs:120
↓ 52 callers
Method
use_def_map
(&self, scope_id: FileScopeId)
crates/ty_python_core/src/lib.rs:409
↓ 52 callers
Method
with_annotated_type
Set the annotated type for this parameter. This also marks the annotation as explicit (not inferred), so it will be displayed.
crates/ty_python_semantic/src/types/signatures.rs:6157
↓ 51 callers
Method
add
(&mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:672
↓ 51 callers
Method
bound_or_constraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:388
↓ 51 callers
Method
current_token_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:397
↓ 51 callers
Function
empty
()
crates/ty_python_semantic/src/types/signatures.rs:6861
↓ 51 callers
Method
is_paramspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:331
↓ 51 callers
Method
is_starred_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2614
↓ 51 callers
Function
parse
Parse the given Python source code using the specified [`ParseOptions`]. This function is the most general function to parse Python code. Based on th
crates/ruff_python_parser/src/lib.rs:281
↓ 51 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/constraints.rs:1314
↓ 51 callers
Method
symbol
(&self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:266
↓ 51 callers
Method
text_len
(self)
crates/ruff_linter/src/docstrings/sections.rs:143
↓ 50 callers
Method
get
Get the symbol info for the symbol identified by the given ID. Returns `None` when the given ID does not reference a symbol in this collection.
crates/ty_ide/src/symbols.rs:131
↓ 50 callers
Method
is_ok
(&self)
crates/ruff_python_parser/tests/generate_inline_tests.rs:205
↓ 50 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/signatures.rs:215
↓ 50 callers
Method
lines
(&self)
crates/ruff_linter/src/noqa.rs:337
↓ 49 callers
Method
class
Return the [`KnownClass`] that inhabitants of this type are instances of at runtime
crates/ty_python_semantic/src/types/method.rs:537
↓ 49 callers
Method
get_mut
(&mut self, index: I)
crates/ruff_index/src/slice.rs:116
↓ 49 callers
Method
is_undefined
Returns `true` if the inner place is undefined (i.e. there is no such member).
crates/ty_python_semantic/src/types/member.rs:40
↓ 49 callers
Method
message
A text [`Element`][crate::Element] in a [`Group`][crate::Group] <div class="warning"> Text passed to this function is allowed to be styled, as such
crates/ruff_annotate_snippets/src/level.rs:124
↓ 49 callers
Method
resolver_environment
(&self)
crates/ty_module_resolver/src/db.rs:73
↓ 48 callers
Function
create_dir_all
( paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, normalized: &Utf8Path, )
crates/ruff_db/src/system/memory_fs.rs:479
↓ 48 callers
Function
create_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints.rs:5198
↓ 48 callers
Method
generic_context
Returns the generic context if this is a generic class.
crates/ty_python_semantic/src/types/class.rs:821
↓ 48 callers
Method
get_or_import_symbol
Generate an [`Edit`] to reference the given symbol. Returns the [`Edit`] necessary to make the symbol available in the current scope along with the bo
crates/ruff_linter/src/importer/mod.rs:285
↓ 48 callers
Method
iter_mro
Returns an iterator over the MRO.
crates/ty_python_semantic/src/types/class.rs:678
↓ 48 callers
Method
parent
(&self)
crates/ruff_db/src/system/path.rs:182
↓ 48 callers
Method
parent
(&self)
crates/ty_python_core/src/scope.rs:150
↓ 48 callers
Method
position
(&self)
crates/ruff_linter/src/noqa.rs:699
↓ 48 callers
Method
suite
Returns the module body contained in this parsed output as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:536
↓ 48 callers
Method
typevar
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:852
↓ 48 callers
Method
with_initialization_options
Set the initial client options for the test server.
crates/ty_server/tests/e2e/main.rs:1349
↓ 48 callers
Function
write
Writes a new baseline containing lint diagnostics with a primary source range in the project. Returns the number of entries written and the diagnosti
crates/ty_project/src/baseline.rs:163
↓ 47 callers
Method
append
(self, x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:15
↓ 47 callers
Function
call
(checker: &Checker, func: &Expr)
crates/ruff_linter/src/rules/pandas_vet/rules/call.rs:170
↓ 47 callers
Method
identifier
Returns the identifier of the command.
crates/ruff_server/src/server.rs:341
↓ 47 callers
Method
map
(self, transform: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types.rs:2331
↓ 47 callers
Method
secondary
Create a secondary annotation attached to the range of the given value in the file currently being type checked. The annotation returned has no messa
crates/ty_python_semantic/src/types/context.rs:240
↓ 46 callers
Method
as_str
(self)
crates/ty_site_packages/src/lib.rs:475
↓ 46 callers
Method
check_type_pair
Return a constraint set indicating the conditions under which `self.relation` holds between `source` and `target`.
crates/ty_python_semantic/src/types/relation.rs:2009
↓ 46 callers
Method
create_directory_all
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:114
↓ 46 callers
Method
dangling
Returns the [dangling comments](self#dangling-comments) of `node`
crates/ruff_python_formatter/src/comments/mod.rs:316
↓ 46 callers
Method
insert
Adds a typevar to this support.
crates/ty_python_semantic/src/types/constraints/support.rs:45
↓ 46 callers
Method
into_boxed_slice
(self)
crates/ty_python_core/src/definition.rs:290
↓ 46 callers
Method
is_empty
Returns true if and only if this collection is empty.
crates/ty_ide/src/symbols.rs:136
↓ 46 callers
Method
is_subtype_of
Return true if this type is a subtype of type `target`. See [`TypeRelation::Subtyping`] for more details.
crates/ty_python_semantic/src/types/relation.rs:399
↓ 46 callers
Method
iter
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:116
↓ 46 callers
Method
kind
Returns how the place load obtains its value.
crates/ty_python_semantic/src/place_load.rs:234
↓ 46 callers
Method
kind
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:280
↓ 46 callers
Method
line_position
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:141
↓ 46 callers
Function
parse
Parse the Markdown `source` as a test suite with given `title`. `validate_config` is invoked once for every literally-declared `toml` config block (a
crates/mdtest/src/parser.rs:25
↓ 46 callers
Method
program_file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:921
↓ 46 callers
Method
replace
(&mut self, line: usize, start: usize, end: usize, string: &str)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:118
↓ 45 callers
Method
next
(&mut self)
crates/ruff_python_ast/src/nodes.rs:308
↓ 45 callers
Method
pop
Removes and returns an arbitrary typevar from this support.
crates/ty_python_semantic/src/types/constraints/support.rs:59
↓ 45 callers
Function
resolve_module_confident
Resolves a module name to a module, without desperate resolution available. This is appropriate for resolving a `KnownModule`, or cases where for wha
crates/ty_module_resolver/src/resolve.rs:98
↓ 45 callers
Method
skip_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:793
↓ 45 callers
Method
split_at
Returns a pair of token slices from both before and after the given [`TextSize`] offset. If the given offset is between two tokens, the "before" slic
crates/ruff_python_ast/src/token/tokens.rs:204
↓ 44 callers
Method
as_str
(self)
crates/ruff_python_ast/src/str.rs:28
↓ 44 callers
Function
get_result
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, )
crates/mdtest/src/matcher.rs:573
↓ 44 callers
Method
is_always_satisfied
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints.rs:619
↓ 44 callers
Method
or_default
(&self)
crates/ty_project/src/metadata/options.rs:2645
↓ 44 callers
Method
trim_start
Trims the indent of `rhs` by `self`. Returns `None` if `self` is not a prefix of `rhs` or either `self` or `rhs` use mixed indentation.
crates/ruff_python_formatter/src/string/docstring.rs:1749
↓ 43 callers
Method
document_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ty_server/tests/e2e/main.rs:1035
↓ 43 callers
Method
get
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
↓ 43 callers
Function
global_scope
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:231
← previous
next →
301–400 of 31,562, ranked by callers