Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,980 in github.com/astral-sh/ruff
⨍
Functions
28,980
◇
Types & classes
6,734
↳
Endpoints
82
↓ 29 callers
Function
map_callable
Given an [`Expr`] that can be callable or not (like a decorator, which could be used with or without explicit call syntax), return the underlying call
crates/ruff_python_ast/src/helpers.rs:887
↓ 29 callers
Method
members
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:371
↓ 29 callers
Method
node
(self)
crates/ty_python_semantic/src/types/constraints.rs:2777
↓ 29 callers
Method
open
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:675
↓ 29 callers
Method
peek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 29 callers
Function
program_file
(db: &TestDb, file: File)
crates/ty_python_core/src/lib.rs:1127
↓ 29 callers
Method
python_version
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:105
↓ 29 callers
Method
reference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:236
↓ 29 callers
Method
sleep
(x, cls, z)
crates/ruff_linter/resources/test/fixtures/pylint/bad_staticmethod_argument.py:36
↓ 29 callers
Function
test_case
(content: &str)
crates/ty_python_core/src/lib.rs:1114
↓ 29 callers
Method
to_comments
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:531
↓ 29 callers
Function
token
(text: &'static str)
crates/ruff_formatter/src/builders.rs:254
↓ 29 callers
Function
tokenize
(source: &'static str)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:45
↓ 29 callers
Method
write_dedented
Writes auto-dedented text to a file.
crates/ruff_db/src/system/test.rs:248
↓ 28 callers
Function
Python
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 28 callers
Method
binding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1025
↓ 28 callers
Method
clear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:375
↓ 28 callers
Method
enter_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:15
↓ 28 callers
Method
entry
( &'a mut self, members: &IndexVec<ScopedMemberId, Member>, member: &Member, )
crates/ty_python_core/src/member.rs:511
↓ 28 callers
Function
exit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:5
↓ 28 callers
Function
from_tokens
( context: &LintContext, path: &Path, locator: &Locator, comment_ranges: &CommentRanges, )
crates/ruff_linter/src/rules/flake8_executable/rules/mod.rs:21
↓ 28 callers
Method
id
(&self)
crates/ty_python_semantic/src/suppression.rs:483
↓ 28 callers
Method
infer_type_expression
Infer the type of a type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:39
↓ 28 callers
Method
inferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_python_semantic/src/semantic_model.rs:764
↓ 28 callers
Method
is_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:216
↓ 28 callers
Method
leave_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:20
↓ 28 callers
Method
node
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:42
↓ 28 callers
Method
starts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:377
↓ 28 callers
Method
store_expression_type
(&mut self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6715
↓ 28 callers
Method
to_instance_approximation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:7237
↓ 28 callers
Method
tokens
Returns the token stream for `path` serialized as a string.
crates/ty_wasm/src/lib.rs:311
↓ 28 callers
Method
values
(&self)
crates/ty_python_core/src/frozen.rs:29
↓ 28 callers
Function
walk_stmt
(checker: &Checker, body: &[Stmt], f: fn(&Stmt) -> bool)
crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs:57
↓ 27 callers
Method
after
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:53
↓ 27 callers
Function
all
(exp)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM111.py:131
↓ 27 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:258
↓ 27 callers
Method
borrow
(&self)
crates/ruff_index/src/vec.rs:111
↓ 27 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:2235
↓ 27 callers
Method
extend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:472
↓ 27 callers
Method
function
(self)
crates/ty_python_semantic/src/types/enums.rs:94
↓ 27 callers
Method
get
(&self, index: I)
crates/ruff_index/src/slice.rs:111
↓ 27 callers
Method
insert
(&mut self, file: File)
crates/ty_project/src/files.rs:221
↓ 27 callers
Method
interface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:1508
↓ 27 callers
Method
len
(&self)
crates/ty_python_core/src/rank.rs:68
↓ 27 callers
Method
or_default
(self, rule_name: &'static str)
crates/ruff_linter/src/linter.rs:97
↓ 27 callers
Method
signature_help
(&self)
crates/ty_ide/src/signature_help.rs:1526
↓ 27 callers
Method
subclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:140
↓ 27 callers
Method
with_python_version
(mut self, python_version: PythonVersion)
crates/ty_module_resolver/src/db.rs:59
↓ 27 callers
Method
with_workspace
Add a workspace to the test server with the given root path.
crates/ruff_server/tests/e2e/main.rs:1016
↓ 26 callers
Method
add_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:707
↓ 26 callers
Method
arg
Adds an argument to the command.
crates/ruff_db/src/system/command.rs:24
↓ 26 callers
Function
collect_unused_names
(source: &str)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:264
↓ 26 callers
Method
contains_line_break
(&self, range: TextRange)
crates/ruff_linter/src/locator.rs:177
↓ 26 callers
Method
current_use_def_map_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1090
↓ 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
entry
(&mut self, item: &dyn Display)
crates/ruff_db/src/display.rs:26
↓ 26 callers
Method
entry
(&'a mut self, code: &'a SecondaryCode)
crates/ruff_linter/src/linter.rs:73
↓ 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
inner_type
Forget about type qualifiers and only return the inner type.
crates/ty_python_semantic/src/types.rs:9690
↓ 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
is_object
Return `true` if this class represents the builtin class `object`
crates/ty_python_semantic/src/types/class.rs:1291
↓ 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
resolve
Returns the re-mapped position or `position` if no mapping exists.
crates/ruff_linter/src/noqa.rs:1310
↓ 26 callers
Method
tests
(&self)
crates/mdtest/src/parser.rs:50
↓ 26 callers
Method
to_class_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:268
↓ 25 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:302
↓ 25 callers
Method
annotation
(&self)
crates/ruff_python_ast/src/nodes.rs:2845
↓ 25 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:647
↓ 25 callers
Method
as_class
(&self)
crates/ty_python_core/src/scope.rs:416
↓ 25 callers
Method
assert_indexed_project_files
(&self, expected: impl IntoIterator<Item = File>)
crates/ty/tests/file_watching.rs:218
↓ 25 callers
Method
checked_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:106
↓ 25 callers
Function
create_constraint
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, bound_typevar: BoundTypeVar
crates/ty_python_semantic/src/types/constraints.rs:7135
↓ 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
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
get
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:11767
↓ 25 callers
Method
next
Advances the cursor and returns the next line.
crates/ty_ide/src/docstring/document/rst.rs:93
↓ 25 callers
Method
program_file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:783
↓ 25 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:557
↓ 25 callers
Method
resolver_environment
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:111
↓ 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:202
↓ 25 callers
Function
sum
()
crates/ruff_text_size/tests/main.rs:15
↓ 25 callers
Method
top_materialization
Returns the top materialization for this class.
crates/ty_python_semantic/src/types/class.rs:1035
↓ 25 callers
Method
value
Return the numeric value for this [`LineWidth`]
crates/ruff_formatter/src/lib.rs:111
↓ 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
↓ 24 callers
Method
bindings
(&self)
crates/ty_python_semantic/src/types/infer.rs:254
↓ 24 callers
Method
cmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/literal.rs:341
↓ 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
files
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callers
Function
fmt
(old: int, new: int, *, greater_is_better: bool = True)
scripts/conformance.py:764
↓ 24 callers
Method
getLogger
(self)
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG002.py:20
↓ 24 callers
Function
infer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:134
↓ 24 callers
Method
insert
Adds a typevar to this support.
crates/ty_python_semantic/src/types/constraints/support.rs:30
↓ 24 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:116
← previous
next →
501–600 of 28,980, ranked by callers