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
↓ 44 callers
Method
is_always_satisfied
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints.rs:615
↓ 44 callers
Method
iter_mro
Iterate over the [method resolution order] ("MRO") of the class. If the MRO could not be accurately resolved, this method falls back to iterating ove
crates/ty_python_semantic/src/types/class/static_literal.rs:990
↓ 44 callers
Method
program_file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:932
↓ 43 callers
Method
get
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
↓ 43 callers
Method
is_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:231
↓ 43 callers
Method
materialization_kind
Returns the pending materialization of a class-based protocol, if any.
crates/ty_python_semantic/src/types/instance.rs:1817
↓ 43 callers
Method
path
(&self)
crates/ruff/src/commands/format.rs:860
↓ 43 callers
Method
push
Extends `self` with `path`. If `path` is absolute, it replaces the current path. On Windows: if `path` has a root but no prefix (e.g., `\windows`),
crates/ruff_db/src/system/path.rs:580
↓ 42 callers
Method
add
Add a file with the given path and contents to this environment.
crates/ruff_db/src/diagnostic/render.rs:2612
↓ 42 callers
Method
as_ref
(&self)
crates/ty_site_packages/src/lib.rs:490
↓ 42 callers
Method
as_static
Returns the static class definition if this is one.
crates/ty_python_semantic/src/types/class.rs:950
↓ 42 callers
Method
contains_range
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:204
↓ 42 callers
Method
current_statement
Return the current [`Stmt`].
crates/ruff_python_semantic/src/model.rs:1490
↓ 42 callers
Method
exact_tuple_instance_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types.rs:3026
↓ 42 callers
Method
extend
(&mut self, iter: T)
crates/ruff_linter/src/registry/rule_set.rs:322
↓ 42 callers
Method
f
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:121
↓ 42 callers
Function
global_scope
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:231
↓ 42 callers
Method
map
(self, provenance: ConstraintProvenance, bound: Type<'db>)
crates/ty_python_semantic/src/types/constraints/variables.rs:864
↓ 42 callers
Method
name
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:177
↓ 42 callers
Function
parse
( short_title: &'s str, source: &'s str, )
crates/ty_test/src/lib.rs:612
↓ 42 callers
Method
set_concise_message
Set a custom message for the concise formatting of this diagnostic. This overrides the default behavior of generating a concise message from the head
crates/ruff_db/src/diagnostic/mod.rs:274
↓ 42 callers
Method
write_file
(&self, path: impl AsRef<Path>, content: &str)
crates/ty/tests/common/mod.rs:113
↓ 42 callers
Method
write_file_all
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`. Enclosing directorie
crates/ruff_db/src/system/memory_fs.rs:229
↓ 41 callers
Method
field
Returns the field declared directly on this dynamic named tuple, if any.
crates/ty_python_semantic/src/types/class/named_tuple.rs:481
↓ 41 callers
Method
get
Get the cached results for a single file at relative `path`. This uses `key` to determine if the results are still accurate. (i.e. if the file hasn't
crates/ruff/src/cache.rs:260
↓ 41 callers
Method
inner
( builder: &mut TypeInferenceBuilder<'db, '_>, subscript: &ast::ExprSubscript,
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2446
↓ 41 callers
Method
is_class
(self)
crates/ty_python_core/src/scope.rs:265
↓ 41 callers
Method
to_scope_id
(self, db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/scope.rs:112
↓ 40 callers
Method
at
Returns `true` if the current token is of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:668
↓ 40 callers
Function
bind_docstring_snapshot_filters
()
crates/ty_ide/src/docstring.rs:145
↓ 40 callers
Method
build
Return the built diagnostic.
crates/ruff_db/src/diagnostic/render.rs:2797
↓ 40 callers
Method
eat
Consume the current token if it is of the given kind. Returns `true` if it matches, `false` otherwise.
crates/ruff_python_parser/src/parser/mod.rs:608
↓ 40 callers
Method
format
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:483
↓ 40 callers
Method
saturating_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:113
↓ 40 callers
Method
types
Returns the typevars and stored bound types still reachable from the decision diagram. Source ordering can retain constraints that are no longer in t
crates/ty_python_semantic/src/types/constraints.rs:341
↓ 40 callers
Function
write
( output: &mut dyn Buffer<Context = Context>, args: Arguments<Context>, )
crates/ruff_formatter/src/lib.rs:858
↓ 39 callers
Method
contains
(&self, file: File)
crates/ty_project/src/files.rs:203
↓ 39 callers
Method
contains
(&self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:28
↓ 39 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:92
↓ 39 callers
Method
iter
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 39 callers
Method
iter
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3772
↓ 39 callers
Method
module_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:11761
↓ 39 callers
Method
path
(&self)
crates/ty_wasm/src/lib.rs:864
↓ 39 callers
Method
root
(&self)
crates/ty/tests/common/mod.rs:145
↓ 39 callers
Method
to_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1470
↓ 39 callers
Method
visit_source_order
(&'a self, visitor: &mut V)
crates/ruff_python_ast/src/node.rs:9
↓ 38 callers
Method
add_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:807
↓ 38 callers
Method
build
(&self)
crates/ty_ide/src/symbols.rs:3347
↓ 38 callers
Method
checked_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:106
↓ 38 callers
Function
empty
()
crates/ty_ide/src/completion.rs:3511
↓ 38 callers
Method
enable_pull_diagnostics
Enable or disable pull diagnostics capability
crates/ty_server/tests/e2e/main.rs:1424
↓ 38 callers
Method
exists
Returns `true` if the file exists.
crates/ruff_db/src/files.rs:562
↓ 38 callers
Method
expect_type
(self)
crates/ty_python_semantic/src/place.rs:311
↓ 38 callers
Method
find
(&self, node: &N)
crates/ty_python_core/src/interned_nodes.rs:53
↓ 38 callers
Function
format_with
Creates an object implementing `Format` that calls the passed closure to perform the formatting. # Examples ``` use ruff_formatter::prelude::*; use
crates/ruff_formatter/src/builders.rs:2323
↓ 38 callers
Method
is_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2651
↓ 38 callers
Method
is_none_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2466
↓ 38 callers
Method
known
Returns the known class, if any.
crates/ty_python_semantic/src/types/class.rs:686
↓ 38 callers
Function
lex_inline_noqa
Lexes in-line `noqa` comment, e.g. `# noqa: F401`
crates/ruff_linter/src/noqa.rs:354
↓ 38 callers
Method
open
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:842
↓ 38 callers
Method
open
(self)
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:66
↓ 38 callers
Method
range
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:158
↓ 38 callers
Method
source
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/symbols.rs:3380
↓ 38 callers
Function
test_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:216
↓ 38 callers
Method
write_files
( &self, files: impl IntoIterator<Item = (&'a str, &'a str)>, )
crates/ty/tests/common/mod.rs:82
↓ 38 callers
Method
write_str
(&mut self, val: &str)
crates/ty_python_semantic/src/types/display.rs:438
↓ 37 callers
Method
as_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2347
↓ 37 callers
Function
default
()
crates/ruff_db/src/diagnostic/render/grouped.rs:264
↓ 37 callers
Method
err
A convenience function for returning a builder for a diagnostic with "error" severity and canned values for its identifier and message.
crates/ruff_db/src/diagnostic/render.rs:2662
↓ 37 callers
Function
import
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:42
↓ 37 callers
Method
into_iter
(self)
crates/ty_server/src/session.rs:1838
↓ 37 callers
Method
scope
(&self)
crates/ty_python_semantic/src/types/context.rs:224
↓ 37 callers
Method
to
(self, unit: str)
crates/ruff_benchmark/resources/pydantic/types.py:740
↓ 37 callers
Function
type
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB168.py:84
↓ 37 callers
Method
with_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:138
↓ 37 callers
Method
write_file
(&mut self, path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4333
↓ 36 callers
Method
arg
Adds an argument to the command.
crates/ruff_db/src/system/command.rs:27
↓ 36 callers
Method
class_origin
Return the class that defines this protocol, if it is class-backed.
crates/ty_python_semantic/src/types/instance.rs:1808
↓ 36 callers
Function
f
()
crates/ty_python_semantic/resources/corpus/10_if_false.py:22
↓ 36 callers
Method
id
(&self)
crates/ty_python_semantic/src/suppression.rs:538
↓ 36 callers
Method
items
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typed_dict.rs:537
↓ 36 callers
Method
never
(&self)
crates/ty_python_semantic/src/types/relation.rs:1863
↓ 36 callers
Function
sorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 36 callers
Method
system_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:299
↓ 36 callers
Method
try_upcast_to_callable
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/callable.rs:176
↓ 35 callers
Function
any_over_expr
Call `func` over every `Expr` in `expr`, returning `true` if any expression returns `true`..
crates/ruff_python_ast/src/helpers.rs:257
↓ 35 callers
Function
definition_expression_type
Infer the type of a (possibly deferred) sub-expression of a [`Definition`]. Supports expressions that are evaluated within a type-params sub-scope.
crates/ty_python_semantic/src/types.rs:407
↓ 35 callers
Function
global_symbol
(db: &'db TestDb, file: File, name: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:33
↓ 35 callers
Function
infer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:267
↓ 35 callers
Method
is_empty
(&self)
crates/ty_site_packages/src/lib.rs:93
↓ 35 callers
Method
is_equivalent_to
Return true if this type is [equivalent to] type `other`. Two equivalent types represent the same sets of values. > Two gradual types `A` and `B` ar
crates/ty_python_semantic/src/types/relation.rs:938
↓ 35 callers
Function
lex_file_exemption
Lexes file-level exemption comment, e.g. `# ruff: noqa: F401`
crates/ruff_linter/src/noqa.rs:387
↓ 35 callers
Method
metadata
Executes `uv workspace metadata` and parses and validates its output.
crates/ty_project/src/uv/command.rs:34
↓ 35 callers
Method
path
(&self)
crates/ty_project/src/uv/service.rs:169
↓ 35 callers
Method
resolver_environment
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:112
↓ 35 callers
Method
tokens
Returns the token stream for `path` serialized as a string.
crates/ty_wasm/src/lib.rs:303
↓ 34 callers
Method
add_positive
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1706
↓ 34 callers
Method
entry
(&mut self, item: &dyn Display)
crates/ruff_db/src/display.rs:26
↓ 34 callers
Method
generic_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:379
↓ 34 callers
Method
get
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:12976
← previous
next →
401–500 of 31,766, ranked by callers