Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 34 callers
Method
python_version
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:106
↓ 34 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:189
↓ 34 callers
Method
resolve_name
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if any.
crates/ruff_python_semantic/src/model.rs:1171
↓ 34 callers
Method
resolver_environment
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:112
↓ 34 callers
Method
system
(&self)
crates/ty_module_resolver/src/db.rs:105
↓ 33 callers
Method
as_ref
(&self)
crates/ruff_db/src/system/path.rs:655
↓ 33 callers
Method
borrow
(&self)
crates/ruff_index/src/vec.rs:111
↓ 33 callers
Method
current_token_kind
(&self)
crates/ruff_python_parser/src/parser/mod.rs:391
↓ 33 callers
Method
get
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:12827
↓ 33 callers
Method
indexer
The [`Indexer`] for the current file, which contains the offsets of all comments and more.
crates/ruff_linter/src/checkers/ast/mod.rs:533
↓ 33 callers
Method
insert
(&mut self, file: File, is_script: bool)
crates/ty_project/src/files.rs:247
↓ 33 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13405
↓ 33 callers
Method
is_always_false
(self)
crates/ty_python_core/src/lib.rs:1001
↓ 33 callers
Method
iter
Iterates over the scripts without duplicates.
crates/ty_project/src/lib.rs:884
↓ 33 callers
Function
map_subscript
Given an [`Expr`] that can be a [`ExprSubscript`][ast::ExprSubscript] or not (like an annotation that may be generic or not), return the underlying ex
crates/ruff_python_ast/src/helpers.rs:902
↓ 33 callers
Method
write_file
(&mut self, path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3447
↓ 32 callers
Method
count
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:579
↓ 32 callers
Method
current_dir
Sets the working directory for the command.
crates/ruff_db/src/system/command.rs:43
↓ 32 callers
Method
get
(&self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:702
↓ 32 callers
Method
is_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callers
Method
kind
(self)
crates/ty_python_semantic/src/types/infer/type_context.rs:72
↓ 32 callers
Method
line_ending
(&self)
crates/ruff_source_file/src/newlines.rs:241
↓ 32 callers
Function
line_index
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:222
↓ 32 callers
Method
members
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:473
↓ 32 callers
Method
peek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 32 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2161
↓ 32 callers
Method
push
(&mut self, segment: &'a str)
crates/ruff_python_ast/src/name.rs:487
↓ 32 callers
Method
root_path
(&self)
crates/ty/tests/file_watching.rs:61
↓ 32 callers
Function
test_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:216
↓ 32 callers
Method
to_instance_approximation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:9010
↓ 32 callers
Method
values
(&self)
crates/ty_python_core/src/frozen.rs:57
↓ 31 callers
Method
as_function_literal
(self)
crates/ty_python_semantic/src/types.rs:3298
↓ 31 callers
Method
binding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1079
↓ 31 callers
Method
clear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:370
↓ 31 callers
Method
contains_line_break
(&self, range: TextRange)
crates/ruff_linter/src/locator.rs:177
↓ 31 callers
Method
current_scope
(&self)
crates/ty_python_core/src/builder.rs:394
↓ 31 callers
Method
get
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:425
↓ 31 callers
Method
inner_type
Forget about type qualifiers and only return the inner type.
crates/ty_python_semantic/src/types.rs:12102
↓ 31 callers
Method
is_same_typevar_as
Returns whether two bound typevars represent the same occurrence, regardless of e.g. differences in their bounds or constraints due to materialization
crates/ty_python_semantic/src/types/typevar.rs:1228
↓ 31 callers
Method
kind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 31 callers
Method
metadata
Executes `uv workspace metadata` and parses and validates its output.
crates/ty_project/src/uv/command.rs:29
↓ 31 callers
Method
nominal_class
If this type is a class instance, returns its class.
crates/ty_python_semantic/src/types.rs:2900
↓ 31 callers
Method
only_binding
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if it's the only binding to that name in its scope.
crates/ruff_python_semantic/src/model.rs:1177
↓ 31 callers
Function
program_file
(db: &TestDb, file: File)
crates/ty_python_core/src/lib.rs:1234
↓ 31 callers
Method
resolve_builtin_symbol
If `expr` is a reference to a builtins symbol, return the name of that symbol. Else, return `None`. This method returns `true` both for "builtin bind
crates/ruff_python_semantic/src/model.rs:419
↓ 31 callers
Function
test_case
(content: &str)
crates/ty_python_core/src/lib.rs:1221
↓ 31 callers
Method
universal_newlines
(&self)
crates/ruff_source_file/src/newlines.rs:13
↓ 31 callers
Function
unknown_rule_selector_test
()
crates/ruff/tests/cli/lint.rs:919
↓ 31 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
↓ 30 callers
Method
as_slice
(&self)
crates/ty_python_core/src/use_def/place_state.rs:267
↓ 30 callers
Function
assert_fail
(result: Result<Vec<Diagnostic>, FailuresByLine>, messages: &[(usize, &[&str])])
crates/mdtest/src/matcher.rs:598
↓ 30 callers
Function
binding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:284
↓ 30 callers
Method
build
Build the test server
crates/ruff_server/tests/e2e/main.rs:1152
↓ 30 callers
Method
end_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1222
↓ 30 callers
Method
file_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:100
↓ 30 callers
Method
files
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:794
↓ 30 callers
Function
filter_result_id
Redact result_id values since they are hash-based and non-deterministic
crates/ty_server/tests/e2e/pull_diagnostics.rs:922
↓ 30 callers
Method
into_owned
(self)
crates/ty_python_semantic/src/types/signatures.rs:6010
↓ 30 callers
Method
is_never_satisfied
Returns whether this constraint set never holds, without checking the type variables' declared bounds or constraints. Use [`Self::has_no_valid_solutio
crates/ty_python_semantic/src/types/constraints.rs:537
↓ 30 callers
Method
is_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callers
Method
last_mut
(&mut self)
crates/ruff_index/src/slice.rs:54
↓ 30 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:890
↓ 30 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:41
↓ 30 callers
Method
store_expression_type
(&mut self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7200
↓ 30 callers
Method
subclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:152
↓ 30 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:58
↓ 30 callers
Method
write_project_file
( &self, relative_path: impl AsRef<SystemPath>, content: &str, )
crates/ty/tests/file_watching.rs:387
↓ 29 callers
Function
Python
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 29 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
↓ 29 callers
Function
assert_parameter_documentation
(raw: &str, expected: &[(&str, &str)])
crates/ty_ide/src/docstring/document/google.rs:1640
↓ 29 callers
Function
create_constraint
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, bound_typevar: BoundTypeVar
crates/ty_python_semantic/src/types/constraints.rs:5207
↓ 29 callers
Method
extension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 29 callers
Method
file_name
(&self)
crates/ty_project/src/watch.rs:102
↓ 29 callers
Function
file_to_module
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, )
crates/ty_module_resolver/src/resolve.rs:349
↓ 29 callers
Method
infer_type_expression
Infer the type of a type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:202
↓ 29 callers
Method
interface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:2049
↓ 29 callers
Method
is_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:176
↓ 29 callers
Method
is_typevartuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:335
↓ 29 callers
Method
line_start
Compute the start position of the docstring's opening line
crates/ruff_linter/src/docstrings/mod.rs:40
↓ 29 callers
Method
node
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:42
↓ 29 callers
Method
or
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:539
↓ 29 callers
Method
reference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:265
↓ 29 callers
Method
signature
Typed internally-visible signature for this function. This represents the annotations on the function itself, unmodified by decorators and overloads.
crates/ty_python_semantic/src/types/function.rs:551
↓ 29 callers
Method
starts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:373
↓ 29 callers
Method
take_watch_changes
(&self, matcher: M)
crates/ty/tests/file_watching.rs:193
↓ 29 callers
Method
to_comments
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:578
↓ 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
with_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:272
↓ 29 callers
Method
with_mocked_typeshed
Use a mock typeshed directory for this test case
crates/ty_module_resolver/src/testing.rs:202
↓ 28 callers
Method
always
(&self)
crates/ty_python_semantic/src/types/relation.rs:1810
↓ 28 callers
Method
as_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2569
↓ 28 callers
Method
as_class_literal
(self)
crates/ty_python_semantic/src/types.rs:3078
↓ 28 callers
Method
as_single
Returns `(left, operator, right)` if there is exactly one operator and two operands.
crates/ruff_python_ast/src/nodes.rs:148
↓ 28 callers
Method
as_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:91
↓ 28 callers
Method
as_system_path
(&self)
crates/ty_module_resolver/src/path.rs:826
↓ 28 callers
Method
bindings
(&self)
crates/ty_python_semantic/src/types/infer.rs:385
↓ 28 callers
Method
enter_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:15
↓ 28 callers
Function
exit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:5
↓ 28 callers
Method
extend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:497
← previous
next →
501–600 of 31,562, ranked by callers