Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,410 in github.com/astral-sh/ruff
⨍
Functions
28,410
◇
Types & classes
6,658
↳
Endpoints
82
↓ 34 callers
Method
current_token_kind
(&self)
crates/ruff_python_parser/src/parser/mod.rs:425
↓ 34 callers
Method
err
A convenience function for returning a builder for a diagnostic with "error" severity and canned values for its identifier and message.
crates/ruff_db/src/diagnostic/render.rs:2678
↓ 34 callers
Method
extend
Extend the current region with the results of a speculative [`TypeInferenceBuilder`].
crates/ty_python_semantic/src/types/infer/builder.rs:11311
↓ 34 callers
Method
get
Returns the [`OverloadLiteral`] representing this matching overload.
crates/ty_python_semantic/src/types/call/bind.rs:8640
↓ 34 callers
Function
import
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:41
↓ 34 callers
Method
is_paramspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:225
↓ 34 callers
Method
is_undefined
Returns `true` if the inner place is undefined (i.e. there is no such member).
crates/ty_python_semantic/src/types/member.rs:36
↓ 34 callers
Method
secondary
Create a secondary annotation attached to the range of the given value in the file currently being type checked. The annotation returned has no messa
crates/ty_python_semantic/src/types/context.rs:96
↓ 33 callers
Method
as_str
(self)
crates/ruff_python_ast/src/str.rs:28
↓ 33 callers
Method
as_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2347
↓ 33 callers
Method
check_type_pair
Return a constraint set indicating the conditions under which `self.relation` holds between `source` and `target`.
crates/ty_python_semantic/src/types/relation.rs:1136
↓ 33 callers
Method
generic_context
Returns the generic context if this is a generic class.
crates/ty_python_semantic/src/types/class.rs:672
↓ 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:514
↓ 33 callers
Method
is_none_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2466
↓ 33 callers
Method
iter
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 33 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:3132
↓ 33 callers
Method
known
Returns the known class, if any.
crates/ty_python_semantic/src/types/class.rs:528
↓ 33 callers
Method
parent
(&self)
crates/ty_python_core/src/scope.rs:139
↓ 33 callers
Function
parse
( short_title: &'s str, source: &'s str, )
crates/ty_test/src/lib.rs:569
↓ 33 callers
Method
push
(&mut self, segment: &'a str)
crates/ruff_python_ast/src/name.rs:462
↓ 33 callers
Function
sorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 32 callers
Method
document_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ty_server/tests/e2e/main.rs:923
↓ 32 callers
Method
function
(self)
crates/ty_python_semantic/src/types/enums.rs:88
↓ 32 callers
Method
into_boxed_slice
(self)
crates/ty_python_core/src/definition.rs:284
↓ 32 callers
Method
into_boxed_slice
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:11839
↓ 32 callers
Method
is_always_satisfied
Returns whether this constraint set always holds.
crates/ty_python_semantic/src/types/constraints.rs:469
↓ 32 callers
Method
is_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callers
Method
line_ending
(&self)
crates/ruff_source_file/src/newlines.rs:241
↓ 32 callers
Method
member
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types.rs:3732
↓ 32 callers
Method
module_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:10889
↓ 32 callers
Method
node
(self)
crates/ty_python_semantic/src/types/constraints.rs:2481
↓ 32 callers
Method
or_default
(&self)
crates/ty_project/src/metadata/options.rs:2335
↓ 32 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
↓ 32 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:1132
↓ 32 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:503
↓ 32 callers
Function
test_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:217
↓ 32 callers
Method
write_str
(&mut self, val: &str)
crates/ty_python_semantic/src/types/display.rs:355
↓ 31 callers
Method
add_positive
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1231
↓ 31 callers
Method
as_ref
(&self)
crates/ruff_db/src/system/path.rs:641
↓ 31 callers
Method
count
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:578
↓ 31 callers
Method
definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:374
↓ 31 callers
Method
into_iter
(self)
crates/ty_python_core/src/frozen.rs:93
↓ 31 callers
Function
line_index
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:206
↓ 31 callers
Method
never
(&self)
crates/ty_python_semantic/src/types/relation.rs:955
↓ 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:1138
↓ 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:380
↓ 31 callers
Function
setup_micro_case
(code: &str)
crates/ruff_benchmark/benches/ty.rs:223
↓ 31 callers
Method
system_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:231
↓ 31 callers
Method
universal_newlines
(&self)
crates/ruff_source_file/src/newlines.rs:13
↓ 31 callers
Method
with_diagnostic_mode
(mut self, diagnostic_mode: DiagnosticMode)
crates/ty_server/src/session/options.rs:102
↓ 30 callers
Function
assert_fail
(result: Result<Vec<Diagnostic>, FailuresByLine>, messages: &[(usize, &[&str])])
crates/mdtest/src/matcher.rs:594
↓ 30 callers
Function
empty
()
crates/ty_ide/src/completion.rs:3289
↓ 30 callers
Function
f
()
crates/ty_python_semantic/resources/corpus/10_if_false.py:22
↓ 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:831
↓ 30 callers
Function
global_scope
(db: &dyn Db, file: File)
crates/ty_python_core/src/lib.rs:224
↓ 30 callers
Method
into_iter
(self)
crates/ty_server/src/session.rs:1592
↓ 30 callers
Method
is_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callers
Method
kind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 30 callers
Method
last_mut
(&mut self)
crates/ruff_index/src/slice.rs:54
↓ 30 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:895
↓ 30 callers
Function
unknown_rule_selector_test
()
crates/ruff/tests/cli/lint.rs:762
↓ 29 callers
Function
assert_parameter_documentation
(raw: &str, expected: &[(&str, &str)])
crates/ty_ide/src/docstring/document/google.rs:1660
↓ 29 callers
Method
current_scope
(&self)
crates/ty_python_core/src/builder.rs:378
↓ 29 callers
Method
is_empty
(&self)
crates/ty_site_packages/src/lib.rs:92
↓ 29 callers
Method
is_equivalent_to
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/newtype.rs:114
↓ 29 callers
Method
known
Create a [`NamedTupleSpec`] with the given fields.
crates/ty_python_semantic/src/types/class/named_tuple.rs:576
↓ 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
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:883
↓ 29 callers
Method
peek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 29 callers
Method
python_version
(&self)
crates/ty_python_semantic/src/db.rs:135
↓ 29 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:40
↓ 29 callers
Method
reference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:236
↓ 29 callers
Method
set_concise_message
Set a custom message for the concise formatting of this diagnostic. This overrides the default behavior of generating a concise message from the head
crates/ruff_db/src/diagnostic/mod.rs:257
↓ 29 callers
Method
system
(&self)
crates/ty_module_resolver/src/db.rs:102
↓ 29 callers
Function
test_case
(content: &str)
crates/ty_python_core/src/lib.rs:1110
↓ 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
variable
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1065
↓ 29 callers
Method
with_mocked_typeshed
Use a mock typeshed directory for this test case
crates/ty_module_resolver/src/testing.rs:188
↓ 29 callers
Method
write_files
( &self, files: impl IntoIterator<Item = (&'a str, &'a str)>, )
crates/ty/tests/cli/main.rs:905
↓ 28 callers
Function
Python
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 28 callers
Method
class_origin
Return the class that defines this protocol, if it is class-backed.
crates/ty_python_semantic/src/types/instance.rs:1073
↓ 28 callers
Function
definition_expression_type
Infer the type of a (possibly deferred) sub-expression of a [`Definition`]. Supports expressions that are evaluated within a type-params sub-scope.
crates/ty_python_semantic/src/types.rs:238
↓ 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
Method
extend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:472
↓ 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
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:693
↓ 28 callers
Method
insert
Insert the type of this argument when inferred with the provided type context.
crates/ty_python_semantic/src/types/call/arguments.rs:92
↓ 28 callers
Method
is_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2651
↓ 28 callers
Method
leave_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:20
↓ 28 callers
Method
members
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:354
↓ 28 callers
Method
node
(self, db: &dyn Db)
crates/ty_python_core/src/scope.rs:30
↓ 28 callers
Method
or_default
(self, rule_name: &'static str)
crates/ruff_linter/src/linter.rs:97
↓ 28 callers
Method
position
Creates a new buffer snapshot that points to the specified position.
crates/ruff_formatter/src/buffer.rs:95
↓ 28 callers
Method
sleep
(x, cls, z)
crates/ruff_linter/resources/test/fixtures/pylint/bad_staticmethod_argument.py:36
↓ 28 callers
Method
starts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:377
← previous
next →
401–500 of 28,410, ranked by callers