Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
27,807 in github.com/astral-sh/ruff
⨍
Functions
27,807
◇
Types & classes
6,608
↳
Endpoints
82
↓ 27 callers
Method
enable_pull_diagnostics
Enable or disable pull diagnostics capability
crates/ty_server/tests/e2e/main.rs:1258
↓ 27 callers
Method
entry
(&mut self, item: &dyn Display)
crates/ruff_db/src/display.rs:26
↓ 27 callers
Method
entry
( &'a mut self, members: &IndexVec<ScopedMemberId, Member>, member: &Member, )
crates/ty_python_core/src/member.rs:511
↓ 27 callers
Method
entry
(&'a mut self, code: &'a SecondaryCode)
crates/ruff_linter/src/linter.rs:73
↓ 27 callers
Method
id
(&self)
crates/ty_python_semantic/src/suppression.rs:482
↓ 27 callers
Method
is_empty
(&self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:628
↓ 27 callers
Method
is_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:125
↓ 27 callers
Method
module
The module for which the types are inferred.
crates/ty_python_semantic/src/types/context.rs:74
↓ 27 callers
Method
write_files
( &self, files: impl IntoIterator<Item = (&'a str, &'a str)>, )
crates/ty/tests/cli/main.rs:920
↓ 26 callers
Function
all
(exp)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM111.py:131
↓ 26 callers
Method
contains_line_break
(&self, range: TextRange)
crates/ruff_linter/src/locator.rs:200
↓ 26 callers
Method
enclosing_node
The closest parent node that fully encloses the comment. A node encloses a comment when the comment is between two of its direct children (ignoring l
crates/ruff_python_formatter/src/comments/visitor.rs:206
↓ 26 callers
Method
exception
(self)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:135
↓ 26 callers
Method
full_display
Return the full snippet for user-facing display, or `None` if the snippet should be truncated.
crates/ruff_linter/src/fix/snippet.rs:18
↓ 26 callers
Method
inferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_python_semantic/src/semantic_model.rs:693
↓ 26 callers
Method
inner_type
Forget about type qualifiers and only return the inner type.
crates/ty_python_semantic/src/types.rs:8268
↓ 26 callers
Method
into_iter
(self)
crates/ruff_python_ast/src/token/tokens.rs:233
↓ 26 callers
Method
is_expression_parenthesized
(&self, expression: ExprRef)
crates/ruff_python_formatter/src/context.rs:89
↓ 26 callers
Method
members
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:439
↓ 26 callers
Method
metadata
(&self, path: impl AsRef<VendoredPath>)
crates/ruff_db/src/vendored.rs:74
↓ 26 callers
Function
new_tokens
Helper function to create [`Tokens`] from an iterator of (kind, range).
crates/ruff_python_ast/src/token/tokens.rs:439
↓ 26 callers
Method
open
Open or create a new cache. `package_root` is the path to root of the package that is contained within this cache and must be canonicalized (to avoid
crates/ruff/src/cache.rs:94
↓ 26 callers
Method
place
(&self, place_id: impl Into<ScopedPlaceId>)
crates/ty_python_core/src/place.rs:263
↓ 26 callers
Method
tests
(&self)
crates/mdtest/src/parser.rs:50
↓ 26 callers
Method
with_python_version
(mut self, python_version: PythonVersion)
crates/ty_module_resolver/src/db.rs:64
↓ 25 callers
Method
annotation
(&self)
crates/ruff_python_ast/src/nodes.rs:2823
↓ 25 callers
Method
as_class_literal
(self)
crates/ty_python_semantic/src/types.rs:1635
↓ 25 callers
Method
as_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:75
↓ 25 callers
Method
assert_indexed_project_files
(&self, expected: impl IntoIterator<Item = File>)
crates/ty/tests/file_watching.rs:207
↓ 25 callers
Function
collect_unused_names
(source: &str)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:220
↓ 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
file_name
(&self)
crates/ruff_db/src/system/path.rs:265
↓ 25 callers
Method
full_line_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:180
↓ 25 callers
Method
get
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:11344
↓ 25 callers
Method
get
(&self, index: I)
crates/ruff_index/src/slice.rs:111
↓ 25 callers
Method
len
(&self)
crates/ty_python_core/src/rank.rs:68
↓ 25 callers
Method
position
Creates a new buffer snapshot that points to the specified position.
crates/ruff_formatter/src/buffer.rs:95
↓ 25 callers
Method
range
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3187
↓ 25 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:551
↓ 25 callers
Method
to_class_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:247
↓ 25 callers
Method
value
Return the numeric value for this [`LineWidth`]
crates/ruff_formatter/src/lib.rs:111
↓ 25 callers
Method
values
(&self)
crates/ty_python_core/src/frozen.rs:29
↓ 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:610
↓ 25 callers
Method
write_dedented
Writes auto-dedented text to a file.
crates/ruff_db/src/system/test.rs:244
↓ 24 callers
Method
add_negative
(self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1297
↓ 24 callers
Method
checked_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:106
↓ 24 callers
Method
clear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:377
↓ 24 callers
Method
context
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 24 callers
Method
definition
Returns the definition where this `TypedDict` is created, if it was assigned to a variable.
crates/ty_python_semantic/src/types/class/typed_dict.rs:857
↓ 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
files
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callers
Function
fmt
(old: int, new: int, *, greater_is_better: bool = True)
scripts/conformance.py:749
↓ 24 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:116
↓ 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:168
↓ 24 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:699
↓ 24 callers
Method
options
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callers
Method
references
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:486
↓ 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:10837
↓ 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:10852
↓ 24 callers
Method
sort
(&mut self)
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:202
↓ 24 callers
Method
source
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callers
Method
span
Conveniently create a `Span` that points into a file in this environment. The path given must have been added via `TestEnvironment::add`. The offset
crates/ruff_db/src/diagnostic/render.rs:2666
↓ 24 callers
Method
subclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:125
↓ 24 callers
Function
sum
()
crates/ruff_text_size/tests/main.rs:15
↓ 24 callers
Method
to_instance_approximation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:6046
↓ 24 callers
Method
visit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:173
↓ 23 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:691
↓ 23 callers
Method
as_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 23 callers
Method
bindings
( &self, )
crates/ty_python_semantic/src/types/infer.rs:235
↓ 23 callers
Method
contains
Return `true` if the given version is required.
crates/ruff_linter/src/settings/types.rs:661
↓ 23 callers
Method
default_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:275
↓ 23 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:1581
↓ 23 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callers
Method
info
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callers
Method
insert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 23 callers
Method
is_directory
(&self, resolver: &ResolverContext)
crates/ty_module_resolver/src/path.rs:91
↓ 23 callers
Method
is_empty
(&self)
crates/ruff_python_ast/src/name.rs:457
↓ 23 callers
Method
is_object
Return `true` if this class represents the builtin class `object`
crates/ty_python_semantic/src/types/class.rs:1166
↓ 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
iter
( &'a self, db: &'a dyn Db, mode: ModuleResolveMode, )
crates/ty_module_resolver/src/resolve.rs:792
↓ 23 callers
Method
iter_source_order
Returns an iterator over the patterns and keywords in source order.
crates/ruff_python_ast/src/nodes.rs:2972
↓ 23 callers
Method
leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:281
↓ 23 callers
Method
len_utf8
(self)
crates/ty_python_semantic/src/suppression.rs:498
↓ 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
next
Advances the cursor and returns the next line.
crates/ty_ide/src/docstring/document/rst.rs:93
↓ 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
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:293
↓ 23 callers
Function
resolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:58
↓ 23 callers
Method
signature_help
(&self)
crates/ty_ide/src/signature_help.rs:1443
↓ 23 callers
Function
single
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 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:184
↓ 23 callers
Method
with_target_version
(mut self, target_version: PythonVersion)
crates/ruff_linter/src/settings/mod.rs:862
↓ 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:3681
↓ 22 callers
Method
always
(&self)
crates/ty_python_semantic/src/types/relation.rs:913
↓ 22 callers
Method
ancestors
Returns an iterator of this module name and all of its parent modules. # Examples ``` use ty_module_resolver::ModuleName; assert_eq!( ModuleName::n
crates/ty_module_resolver/src/module_name.rs:301
↓ 22 callers
Function
any_over_type
Return `true` if `ty`, or any of the types contained in `ty`, match the closure passed in. The function guards against infinite recursion by keeping
crates/ty_python_semantic/src/types/visitor.rs:543
↓ 22 callers
Method
bases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
← previous
next →
501–600 of 27,807, ranked by callers