Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
29,651 in github.com/astral-sh/ruff
⨍
Functions
29,651
◇
Types & classes
6,852
↳
Endpoints
82
↓ 25 callers
Function
binding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:234
↓ 25 callers
Method
bindings
(&self)
crates/ty_python_semantic/src/types/infer.rs:257
↓ 25 callers
Method
current_expression_parent
Return the parent [`Expr`] of the current [`Expr`], if any.
crates/ruff_python_semantic/src/model.rs:1500
↓ 25 callers
Method
expect_type
(self)
crates/ty_python_semantic/src/place.rs:307
↓ 25 callers
Function
file_to_module
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, )
crates/ty_module_resolver/src/resolve.rs:344
↓ 25 callers
Method
full_line_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:157
↓ 25 callers
Method
get
(&self, index: usize)
crates/ruff_db/src/parsed.rs:496
↓ 25 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:12786
↓ 25 callers
Method
is_always_false
(self)
crates/ty_python_core/src/lib.rs:949
↓ 25 callers
Method
metadata
Executes `uv workspace metadata` and parses and validates its output.
crates/ty_project/src/uv/command.rs:26
↓ 25 callers
Method
pop
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:5548
↓ 25 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:558
↓ 25 callers
Method
root
(&self)
crates/ty/tests/cli/main.rs:981
↓ 25 callers
Method
run
Run the benchmark using `hyperfine`.
scripts/ty_benchmark/src/benchmark/__init__.py:49
↓ 25 callers
Method
sort
(&mut self)
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:203
↓ 25 callers
Function
sum
()
crates/ruff_text_size/tests/main.rs:15
↓ 25 callers
Method
visit_body
(&mut self, body: &[ruff_python_ast::Stmt])
crates/ruff_linter/src/rules/numpy/helpers.rs:42
↓ 25 callers
Method
visit_node
(&mut self, node: &'ast T)
crates/ruff_db/src/parsed.rs:630
↓ 25 callers
Method
with_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:265
↓ 24 callers
Method
add_unsupported_syntax_error
Add an [`UnsupportedSyntaxError`] with the given [`UnsupportedSyntaxErrorKind`] and [`TextRange`] if its minimum version is less than [`Parser::target
crates/ruff_python_parser/src/parser/mod.rs:684
↓ 24 callers
Method
as_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:75
↓ 24 callers
Method
components
(&self)
crates/ty_module_resolver/src/module_name.rs:83
↓ 24 callers
Method
concrete_base_type
Walk the `NewTypeBase` chain to find the underlying non-newtype `Type`. There might not be one if this `NewType` is cyclical, and we fall back to `obj
crates/ty_python_semantic/src/types/newtype.rs:111
↓ 24 callers
Method
context
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 24 callers
Method
eat_while
Eats symbols while predicate returns true or until the end of file is reached.
crates/ruff_python_trivia/src/cursor.rs:147
↓ 24 callers
Method
end_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1004
↓ 24 callers
Method
expression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:244
↓ 24 callers
Method
file_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:100
↓ 24 callers
Method
files
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callers
Function
fmt
(old: int, new: int, *, greater_is_better: bool = True)
scripts/conformance.py:769
↓ 24 callers
Method
full_range
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition.rs:42
↓ 24 callers
Method
get
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:425
↓ 24 callers
Method
getLogger
(self)
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG002.py:20
↓ 24 callers
Method
in_stub
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:969
↓ 24 callers
Method
inner
( builder: &mut TypeInferenceBuilder<'db, '_>, subscript: &ast::ExprSubscript,
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2054
↓ 24 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:117
↓ 24 callers
Method
is_directory
(&self, resolver: &ResolverContext)
crates/ty_module_resolver/src/path.rs:94
↓ 24 callers
Method
is_end_of_line
(self)
crates/ruff_python_trivia/src/comments.rs:101
↓ 24 callers
Method
is_match
(&self, banned_module: &str)
crates/ruff_linter/src/rules/flake8_tidy_imports/matchers.rs:10
↓ 24 callers
Method
isolate
(mut self, isolation: IsolationLevel)
crates/ruff_diagnostics/src/fix.rs:157
↓ 24 callers
Method
iter_source_order
Returns an iterator over the patterns and keywords in source order.
crates/ruff_python_ast/src/nodes.rs:2994
↓ 24 callers
Method
len_utf8
(self)
crates/ty_python_semantic/src/suppression.rs:499
↓ 24 callers
Method
options
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callers
Method
paramspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1036
↓ 24 callers
Method
range
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3083
↓ 24 callers
Method
references
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:487
↓ 24 callers
Function
single
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 24 callers
Method
skip_builtins
When set, builtins from completions are skipped. This is useful in tests to reduce noise for scope based completions. Not enabled by default.
crates/ty_ide/src/completion.rs:11274
↓ 24 callers
Method
skip_keywords
When set, keywords from completions are skipped. This is useful in tests to reduce noise for scope based completions. Not enabled by default. Note t
crates/ty_ide/src/completion.rs:11289
↓ 24 callers
Method
source
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:632
↓ 23 callers
Method
as_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 23 callers
Method
contains
Return `true` if the given version is required.
crates/ruff_linter/src/settings/types.rs:657
↓ 23 callers
Method
db
(&self)
crates/ty/tests/file_watching.rs:56
↓ 23 callers
Method
file_name
(&self)
crates/ruff_db/src/system/path.rs:265
↓ 23 callers
Method
files
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:754
↓ 23 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callers
Method
generic_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:364
↓ 23 callers
Method
info
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callers
Method
is_empty
(&self)
crates/ruff_python_ast/src/name.rs:457
↓ 23 callers
Function
is_python_whitespace
Returns `true` for [whitespace](https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens) characters.
crates/ruff_python_trivia/src/whitespace.rs:84
↓ 23 callers
Method
kind
(&self)
crates/ty_ide/src/lib.rs:216
↓ 23 callers
Method
leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:281
↓ 23 callers
Method
match_typing_qualified_name
Return `true` if the call path is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:251
↓ 23 callers
Method
matching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4508
↓ 23 callers
Method
member_lookup_with_policy
Similar to [`Type::member`], but allows the caller to specify what policy should be used when looking up attributes. See [`MemberLookupPolicy`] for mo
crates/ty_python_semantic/src/types.rs:5283
↓ 23 callers
Method
openness
Returns whether this `TypedDict` is implicitly open, closed, or has explicit extra items. A class-based `TypedDict` inherits the first explicit polic
crates/ty_python_semantic/src/types/typed_dict.rs:241
↓ 23 callers
Function
parse_unchecked
Parse the given Python source code using the specified [`ParseOptions`]. This is same as the [`parse`] function except that it doesn't check for any
crates/ruff_python_parser/src/lib.rs:289
↓ 23 callers
Method
prefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1207
↓ 23 callers
Method
primary_span
Returns the "primary" span of this diagnostic if one exists. When there are multiple primary spans, then the first one that was added to this diagnos
crates/ruff_db/src/diagnostic/mod.rs:311
↓ 23 callers
Function
resolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:60
↓ 23 callers
Method
resolver_file
Returns the resolver key for this file.
crates/ty_python_core/src/program_file.rs:85
↓ 23 callers
Method
source
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 23 callers
Method
sub
Adds a "sub" diagnostic to this diagnostic. This is useful when a sub diagnostic has its own annotations attached to it. For the simpler case of a su
crates/ruff_db/src/diagnostic/mod.rs:192
↓ 23 callers
Method
to_owned
(&self)
crates/ruff_index/src/slice.rs:197
↓ 23 callers
Method
uri
(&self)
crates/ty_server/src/document/notebook.rs:65
↓ 23 callers
Method
with_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:133
↓ 23 callers
Method
write_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 22 callers
Method
add_positive_in_place
(&mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1245
↓ 22 callers
Method
add_primary_tag
Adds a tag on the primary annotation for this diagnostic. This tag is associated with the primary annotation created for every `Diagnostic` that uses
crates/ruff_linter/src/checkers/ast/mod.rs:3696
↓ 22 callers
Method
args
Adds multiple arguments to the command.
crates/ruff_db/src/system/command.rs:30
↓ 22 callers
Method
bases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
↓ 22 callers
Method
encoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1598
↓ 22 callers
Method
extend
(&mut self, it: T)
crates/ty_ide/src/completion.rs:295
↓ 22 callers
Method
file
(&self)
crates/ty_python_semantic/src/lint.rs:138
↓ 22 callers
Function
global_symbol
(db: &'db TestDb, file: File, name: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:29
↓ 22 callers
Method
has_known_class
Returns whether this is a nominal instance of a particular [`KnownClass`].
crates/ty_python_semantic/src/types/instance.rs:270
↓ 22 callers
Method
into_class
(self)
crates/ty_python_semantic/src/types/class_base.rs:356
↓ 22 callers
Method
iter_mut
( &mut self, )
crates/ty_python_core/src/frozen.rs:18
↓ 22 callers
Method
len
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/render.rs:2503
↓ 22 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:573
↓ 22 callers
Function
pad
Add leading or trailing whitespace to a snippet, if it's immediately preceded or followed by an identifier or keyword.
crates/ruff_linter/src/fix/edits.rs:615
↓ 22 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:1414
↓ 22 callers
Method
push
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:479
↓ 22 callers
Method
query
(&self)
crates/ruff_server/src/session.rs:226
↓ 22 callers
Function
test_contents
A convenient wrapper around [`check_path`], that additionally asserts that fixes converge after a fixed number of iterations.
crates/ruff_linter/src/test.rs:245
↓ 22 callers
Method
try_upcast_to_callable
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/callable.rs:45
↓ 21 callers
Function
absolute
(path: &str)
crates/ty_project/src/uv/metadata/dependencies.rs:360
↓ 21 callers
Method
as_class_literal
(self)
crates/ty_python_semantic/src/types.rs:2600
↓ 21 callers
Method
as_function
(&self)
crates/ty_python_core/src/scope.rs:427
← previous
next →
601–700 of 29,651, ranked by callers