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
↓ 34 callers
Method
get
(&self, index: I)
crates/ruff_index/src/slice.rs:111
↓ 34 callers
Method
into_iter
(self)
crates/ty_python_core/src/frozen.rs:121
↓ 34 callers
Method
is_always_false
(self)
crates/ty_python_core/src/lib.rs:1001
↓ 34 callers
Method
iter_non_variadic_params
Returns an iterator over all non-variadic parameters included in this [`Parameters`] node. The variadic parameters (`.vararg` and `.kwarg`) can never
crates/ruff_python_ast/src/nodes.rs:3340
↓ 34 callers
Function
parse_expression
Parses a single Python expression. This convenience function can be used to parse a single expression without having to specify the Mode or the locat
crates/ruff_python_parser/src/lib.rs:135
↓ 34 callers
Method
place
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:245
↓ 34 callers
Method
program
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:279
↓ 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:1156
↓ 34 callers
Function
single
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 34 callers
Method
system
(&self)
crates/ty_module_resolver/src/db.rs:105
↓ 34 callers
Method
values
(&self)
crates/ty_python_core/src/frozen.rs:57
↓ 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
indexer
The [`Indexer`] for the current file, which contains the offsets of all comments and more.
crates/ruff_linter/src/checkers/ast/mod.rs:538
↓ 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:13565
↓ 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
nominal_class
If this type is a class instance, returns its class.
crates/ty_python_semantic/src/types.rs:2899
↓ 33 callers
Method
to_instance_approximation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:9070
↓ 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:717
↓ 32 callers
Method
is_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callers
Method
iter
Iterates over the scripts without duplicates.
crates/ty_project/src/lib.rs:894
↓ 32 callers
Method
kind
(self)
crates/ty_python_semantic/src/types/infer/type_context.rs:95
↓ 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:486
↓ 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:2163
↓ 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:62
↓ 32 callers
Method
subclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:152
↓ 31 callers
Method
as_function_literal
(self)
crates/ty_python_semantic/src/types.rs:3297
↓ 31 callers
Method
as_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:91
↓ 31 callers
Method
binding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1084
↓ 31 callers
Function
binding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:285
↓ 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
file_name
(&self)
crates/ty_project/src/watch.rs:102
↓ 31 callers
Method
files
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:804
↓ 31 callers
Method
get
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:425
↓ 31 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:533
↓ 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:1276
↓ 31 callers
Method
kind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 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:1162
↓ 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:404
↓ 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
↓ 30 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:309
↓ 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
Method
build
Build the test server
crates/ruff_server/tests/e2e/main.rs:1152
↓ 30 callers
Method
clear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:370
↓ 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
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:5913
↓ 30 callers
Method
is_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callers
Method
iter
(&self, context: &ResolverContext<'db>)
crates/ty_module_resolver/src/resolve/search.rs:1039
↓ 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
or
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:582
↓ 30 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:41
↓ 30 callers
Method
send
(&mut self, message: Message)
crates/ty_server/tests/e2e/main.rs:383
↓ 30 callers
Method
starts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:373
↓ 30 callers
Method
store_expression_type
(&mut self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7320
↓ 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:388
↓ 29 callers
Function
Python
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 29 callers
Method
as_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2569
↓ 29 callers
Method
as_system_path
(&self)
crates/ty_module_resolver/src/path.rs:827
↓ 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:5283
↓ 29 callers
Method
extension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 29 callers
Function
file_to_module
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, )
crates/ty_module_resolver/src/resolve.rs:394
↓ 29 callers
Method
interface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:2094
↓ 29 callers
Method
is_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:176
↓ 29 callers
Method
iter_mut
( &mut self, )
crates/ty_python_core/src/frozen.rs:50
↓ 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
next
Advances the cursor and returns the next line.
crates/ty_ide/src/docstring/document/rst.rs:93
↓ 29 callers
Method
node
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:42
↓ 29 callers
Method
reference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:265
↓ 29 callers
Function
setup_rayon
()
crates/ruff_benchmark/benches/ty_shared/mod.rs:21
↓ 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
take_watch_changes
(&self, matcher: M)
crates/ty/tests/file_watching.rs:194
↓ 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:1859
↓ 28 callers
Method
as_class
(&self)
crates/ty_python_core/src/scope.rs:415
↓ 28 callers
Method
as_class_literal
(self)
crates/ty_python_semantic/src/types.rs:3077
↓ 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:161
← previous
next →
501–600 of 31,766, ranked by callers