Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,707 in github.com/astral-sh/ruff
⨍
Functions
28,707
◇
Types & classes
6,694
↳
Endpoints
82
↓ 11 callers
Method
as_notebook
(&self)
crates/ty_server/src/session/index.rs:262
↓ 11 callers
Method
as_str
(self)
crates/ty_ide/src/completion.rs:772
↓ 11 callers
Function
assert_no_match
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:380
↓ 11 callers
Method
bindings
(&self)
crates/ty_python_core/src/use_def/place_state.rs:588
↓ 11 callers
Method
build
(self)
crates/ruff_db/src/testing.rs:202
↓ 11 callers
Method
cache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_cache/src/globset.rs:6
↓ 11 callers
Method
cell
Returns the (raw) cell number (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:29
↓ 11 callers
Method
change_text_document
Send a `textDocument/didChange` notification with the given content changes
crates/ty_server/tests/e2e/main.rs:813
↓ 11 callers
Function
class_member
Infer the public type of a class member/symbol (its type as seen from outside its scope) in the given `scope`.
crates/ty_python_semantic/src/types/member.rs:56
↓ 11 callers
Method
constraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:284
↓ 11 callers
Method
context
Return the [`LintContext`] for the current analysis. Note that you should always prefer calling methods like `settings`, `report_diagnostic`, or `is_
crates/ruff_linter/src/checkers/ast/mod.rs:665
↓ 11 callers
Method
create_directory_all
Creates a directory at `path`. All enclosing directories are created if they don't exist.
crates/ruff_db/src/system/memory_fs.rs:324
↓ 11 callers
Function
enum_metadata
( db: &'db dyn Db, class: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types/enums.rs:975
↓ 11 callers
Method
file
Returns the `UnifiedFile` attached to this `Span`.
crates/ruff_db/src/diagnostic/mod.rs:1244
↓ 11 callers
Method
file
(self, db: &dyn Db)
crates/ty_python_core/src/scope.rs:26
↓ 11 callers
Method
file_path
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:775
↓ 11 callers
Function
file_system
()
crates/ty_vendored/src/lib.rs:18
↓ 11 callers
Method
files
(&self)
crates/ruff_db/src/lib.rs:195
↓ 11 callers
Method
filter_union
If the type is a union (or a type alias that resolves to a union), filters union elements based on the provided predicate. Otherwise, returns the typ
crates/ty_python_semantic/src/types.rs:2546
↓ 11 callers
Method
first
(&self)
crates/ruff_linter/src/suppression.rs:187
↓ 11 callers
Method
focus_range
(&self)
crates/ty_ide/src/lib.rs:151
↓ 11 callers
Method
hide_severity
Whether to hide a diagnostic's severity or not.
crates/ruff_db/src/diagnostic/mod.rs:1540
↓ 11 callers
Method
includes
Returns `true` if the string list of `codes` includes `code` (or an alias thereof).
crates/ruff_linter/src/noqa.rs:134
↓ 11 callers
Method
infer_definition
(&mut self, node: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy)
crates/ty_python_semantic/src/types/infer/builder.rs:2038
↓ 11 callers
Method
into_suite
Consumes the [`Parsed`] output and returns the module body as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:533
↓ 11 callers
Method
is_assignment
(&self, expr: &Expr)
crates/ruff_linter/src/rules/pylint/helpers.rs:91
↓ 11 callers
Function
is_const_true
Return `true` if an [`Expr`] is a literal `True`.
crates/ruff_python_ast/src/helpers.rs:835
↓ 11 callers
Method
is_empty
(&self)
crates/mdtest/src/matcher.rs:52
↓ 11 callers
Method
is_keyword
(self)
crates/ruff_python_ast/src/token.rs:344
↓ 11 callers
Method
is_positional
Returns `true` if this is either a positional-only or standard (positional or keyword) parameter.
crates/ty_python_semantic/src/types/signatures.rs:5520
↓ 11 callers
Method
is_protocol
Return `true` if this class is a protocol class. In an ideal world, perhaps we wouldn't hardcode this knowledge here; instead, we'd just look at the
crates/ty_python_semantic/src/types/class/known.rs:662
↓ 11 callers
Method
is_required
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3097
↓ 11 callers
Method
join_comma_separated
( &'fmt mut self, sequence_end: TextSize, )
crates/ruff_python_formatter/src/builders.rs:73
↓ 11 callers
Method
join_with
Joins the objects by placing the specified separator between every two items. ## Examples Joining different tokens by separating them with a comma a
crates/ruff_formatter/src/formatter.rs:101
↓ 11 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:718
↓ 11 callers
Method
leading_dangling_trailing
Returns an iterator over the [leading](self#leading-comments), [dangling](self#dangling-comments), and [trailing](self#trailing) comments of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:349
↓ 11 callers
Method
len
(&self)
crates/ty_server/src/server/schedule/thread/pool.rs:133
↓ 11 callers
Method
len
(&self)
crates/ruff_server/src/server/schedule/thread/pool.rs:130
↓ 11 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/signatures.rs:4841
↓ 11 callers
Method
mark_formatted
Marks the comment as formatted
crates/ruff_python_formatter/src/comments/mod.rs:146
↓ 11 callers
Method
materialize
Applies both constraint kinds between the place's last materialized nodes and `target`. The place's node must be an ancestor of `target`. After mater
crates/ty_python_core/src/use_def.rs:1439
↓ 11 callers
Method
next
(&mut self)
crates/ruff_python_semantic/src/analyze/class.rs:99
↓ 11 callers
Method
or_fall_back_to
Fallback (wholly or partially) to `fallback` to create a new [`LookupResult`].
crates/ty_python_semantic/src/place.rs:430
↓ 11 callers
Method
parameter_documentation
Extract parameter documentation from popular docstring formats. Returns a map of parameter names to their documentation.
crates/ty_ide/src/docstring.rs:50
↓ 11 callers
Method
parent_statement_id
Given a [`NodeId`], return the [`NodeId`] of the parent statement, if any.
crates/ruff_python_semantic/src/model.rs:1647
↓ 11 callers
Function
parenthesized
Formats `content` enclosed by the `left` and `right` parentheses. The implementation also ensures that expanding the parenthesized expression (or any
crates/ruff_python_formatter/src/expression/parentheses.rs:109
↓ 11 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:914
↓ 11 callers
Method
permissions
(&self)
crates/ruff_db/src/system.rs:308
↓ 11 callers
Method
pop
(&mut self)
crates/ty_module_resolver/src/path.rs:82
↓ 11 callers
Method
qualifiers
Get qualifiers for an annotation expression.
crates/ty_python_semantic/src/types/infer.rs:944
↓ 11 callers
Method
quote
(&self)
crates/ruff_python_codegen/src/stylist.rs:25
↓ 11 callers
Method
restore
Restore the semantic model to the given [`Snapshot`].
crates/ruff_python_semantic/src/model.rs:2064
↓ 11 callers
Method
revision
(&self)
crates/ruff_db/src/system.rs:304
↓ 11 callers
Method
run
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:34
↓ 11 callers
Function
search_paths
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, resolve_mode: ModuleResolveMode
crates/ty_module_resolver/src/resolve.rs:404
↓ 11 callers
Method
set_search_paths
(&mut self, search_paths: SearchPaths)
crates/ty_module_resolver/src/db.rs:64
↓ 11 callers
Method
show_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ruff_server/src/session/client.rs:198
↓ 11 callers
Method
slice
Returns the location of the comment in the original source code. Allows retrieving the text of the comment.
crates/ruff_python_formatter/src/comments/mod.rs:137
↓ 11 callers
Method
subtypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:752
↓ 11 callers
Method
take_snapshot
Creates a document snapshot with the URI referencing the document to snapshot.
crates/ruff_server/src/session.rs:97
↓ 11 callers
Function
test_resource_path
(path: impl AsRef<Path>)
crates/ruff_linter/src/test.rs:121
↓ 11 callers
Method
text_len
(&self)
crates/ruff_python_parser/src/lexer/cursor.rs:66
↓ 11 callers
Method
to_intersection
Reconstruct the equivalent set-theoretic intersection.
crates/ty_python_semantic/src/types/enums.rs:892
↓ 11 callers
Method
to_text_size
( self, text: &str, index: &LineIndex, position_encoding: PositionEncoding,
crates/ty_wasm/src/lib.rs:1177
↓ 11 callers
Method
token_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:68
↓ 11 callers
Method
token_range
(&self)
crates/ruff_python_parser/src/lexer.rs:1430
↓ 11 callers
Method
values
()
crates/ruff_linter/src/registry.rs:398
↓ 11 callers
Method
when_any
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:202
↓ 11 callers
Method
when_assignable_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:491
↓ 11 callers
Method
with_definition
Create a new signature with the given definition.
crates/ty_python_semantic/src/types/signatures.rs:1880
↓ 11 callers
Method
with_extension
(&self, extension: &str)
crates/ruff_db/src/system/path.rs:365
↓ 11 callers
Method
with_name
(self, name: impl Into<OptionCow<'a>>)
crates/ruff_annotate_snippets/src/level.rs:167
↓ 11 callers
Method
with_quote_style
(mut self, quote_style: Quote)
crates/ruff_python_ast/src/nodes.rs:953
↓ 10 callers
Method
add
(&mut self, line_range: TextRange)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:563
↓ 10 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:1362
↓ 10 callers
Method
apply_override_options
Applies higher-precedence options to this project. Options applied later take precedence over options applied earlier.
crates/ty_project/src/metadata.rs:445
↓ 10 callers
Method
args
Adds multiple arguments to the command.
crates/ruff_db/src/system/command.rs:30
↓ 10 callers
Method
as_slice
(&self)
crates/ty_python_semantic/src/types/signatures.rs:4398
↓ 10 callers
Method
as_str
Returns the string representation of the quote style.
crates/ruff_python_formatter/src/options.rs:278
↓ 10 callers
Function
assert_notebook_path
( path: impl AsRef<Path>, expected: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:187
↓ 10 callers
Method
assignability_error_context
Re-run the assignability check with error context collection enabled. This should normally be called when `is_assignable_to` has returned `false` and
crates/ty_python_semantic/src/types/relation.rs:411
↓ 10 callers
Function
before_main
()
crates/ruff_wasm/src/lib.rs:206
↓ 10 callers
Method
bind_self_typevars
Bind `Self` type variables in this type to a concrete self type. Uses MRO-based matching: a `Self` typevar is only bound if its owner class is in the
crates/ty_python_semantic/src/types.rs:1650
↓ 10 callers
Method
bottom_materialization
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1953
↓ 10 callers
Method
bump
Bumps the token source to the next non-trivia token. It pushes the given kind to the token vector with the current token range.
crates/ruff_python_parser/src/token_source.rs:162
↓ 10 callers
Method
canonicalize
(path: &SystemPath, system: &dyn System)
crates/ty_module_resolver/src/resolve.rs:682
↓ 10 callers
Method
cell_index
Attach a Jupyter notebook cell index.
crates/ruff_annotate_snippets/src/snippet.rs:301
↓ 10 callers
Method
chars
Return the remaining input as a string slice.
crates/ruff_python_trivia/src/cursor.rs:30
↓ 10 callers
Method
closer_len
The total length of the string's closer. This is always equal to `self.quote_len()`, except when the string is unclosed, in which case the length is z
crates/ruff_python_ast/src/nodes.rs:847
↓ 10 callers
Method
cmp
We sort diagnostics in a way that keeps them in source order and grouped by file. After that, we fall back to severity (with fatal messages sorting be
crates/ruff_db/src/diagnostic/mod.rs:574
↓ 10 callers
Method
completions
Returns the underlying completions if the convenience assertions aren't sufficiently expressive.
crates/ty_ide/src/completion.rs:11393
↓ 10 callers
Method
current_statement_parent_id
Return the [`NodeId`] of the current [`Stmt`] parent, if any.
crates/ruff_python_semantic/src/model.rs:1524
↓ 10 callers
Method
dataclass_transformer_params
(self)
crates/ty_python_semantic/src/types/class.rs:289
↓ 10 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:587
↓ 10 callers
Method
defining_class
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:228
↓ 10 callers
Method
definition
Returns the [`Definition`] of this function. ## Warning This uses the semantic index to find the definition of the function. This means that if the
crates/ty_python_semantic/src/types/function.rs:446
↓ 10 callers
Function
deserialize
()
crates/ruff_workspace/src/pyproject.rs:290
↓ 10 callers
Method
end
(&self)
crates/ruff_source_file/src/newlines.rs:223
↓ 10 callers
Function
exception
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET504.py:175
↓ 10 callers
Method
explicit_bases
Return an iterator over the inferred types of this class's *explicit* bases. Note that any class (except for `object`) that has no explicit bases wil
crates/ty_python_semantic/src/types/class/static_literal.rs:622
← previous
next →
1,201–1,300 of 28,707, ranked by callers