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
↓ 23 callers
Method
is_never_satisfied
Returns whether this constraint set never holds.
crates/ty_python_semantic/src/types/constraints.rs:453
↓ 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
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
materialization_kind
Returns the pending materialization of a class-based protocol, if any.
crates/ty_python_semantic/src/types/instance.rs:1082
↓ 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:310
↓ 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:1444
↓ 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:191
↓ 23 callers
Method
with_target_version
(mut self, target_version: PythonVersion)
crates/ruff_linter/src/settings/mod.rs:862
↓ 22 callers
Method
add
(&mut self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:558
↓ 22 callers
Method
add_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:670
↓ 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
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
Method
bases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
↓ 22 callers
Method
binding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:931
↓ 22 callers
Method
cmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/literal.rs:336
↓ 22 callers
Method
components
(&self)
crates/ty_module_resolver/src/module_name.rs:82
↓ 22 callers
Method
contains
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:165
↓ 22 callers
Method
current_use_def_map_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1090
↓ 22 callers
Method
in_stub
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:873
↓ 22 callers
Method
insert
(&mut self, file: File)
crates/ty_project/src/files.rs:221
↓ 22 callers
Method
into_class
(self)
crates/ty_python_semantic/src/types/class_base.rs:335
↓ 22 callers
Method
is_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:148
↓ 22 callers
Method
is_unknown
(&self)
crates/ty_python_semantic/src/types.rs:1203
↓ 22 callers
Method
keys
(&self)
crates/ruff_linter/src/linter.rs:83
↓ 22 callers
Method
len
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/render.rs:2488
↓ 22 callers
Method
member_lookup_with_policy
Similar to [`Type::member`], but allows the caller to specify what policy should be used when looking up attributes. See [`MemberLookupPolicy`] for mo
crates/ty_python_semantic/src/types.rs:3738
↓ 22 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:573
↓ 22 callers
Method
openness
Returns whether this `TypedDict` is implicitly open, closed, or has explicit extra items. A class-based `TypedDict` inherits the first explicit polic
crates/ty_python_semantic/src/types/typed_dict.rs:237
↓ 22 callers
Function
pad
Add leading or trailing whitespace to a snippet, if it's immediately preceded or followed by an identifier or keyword.
crates/ruff_linter/src/fix/edits.rs:615
↓ 22 callers
Method
path
(&self)
crates/ruff_db/src/system.rs:348
↓ 22 callers
Method
push
(&mut self, constraint: ConstraintAssignment)
crates/ty_python_semantic/src/types/constraints.rs:7344
↓ 22 callers
Method
query
(&self)
crates/ruff_server/src/session.rs:226
↓ 22 callers
Method
source
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 22 callers
Method
uri
(&self)
crates/ty_server/src/document/range.rs:78
↓ 22 callers
Method
with_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:123
↓ 21 callers
Method
codegen_stylist
(&self, stylist: &'a Stylist)
crates/ruff_linter/src/fix/codemods.rs:28
↓ 21 callers
Method
drain
(&mut self, range: R)
crates/ruff_index/src/vec.rs:42
↓ 21 callers
Method
encoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1380
↓ 21 callers
Method
full_range
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition.rs:42
↓ 21 callers
Method
get
(&self, index: usize)
crates/ruff_db/src/parsed.rs:484
↓ 21 callers
Method
has_known_class
Returns whether this is a nominal instance of a particular [`KnownClass`].
crates/ty_python_semantic/src/types/instance.rs:270
↓ 21 callers
Function
infer_same_file_expression_type
Infers the type of an `expression` that is guaranteed to be in the same file as the calling query. This is a small helper around [`infer_expression_t
crates/ty_python_semantic/src/types/infer.rs:417
↓ 21 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:11885
↓ 21 callers
Method
is_empty
Returns `true` if there are no fixes in the map.
crates/ruff/src/diagnostics.rs:136
↓ 21 callers
Method
line_column
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:39
↓ 21 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:342
↓ 21 callers
Function
parse_suite
(source: &str)
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:196
↓ 21 callers
Method
preceding_node
Returns the comment's preceding node. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that precede
crates/ruff_python_formatter/src/comments/visitor.rs:255
↓ 21 callers
Method
push
(&mut self, value: T)
crates/ruff_formatter/src/printer/stack.rs:18
↓ 21 callers
Method
push
Pushes the given line as part of this code example.
crates/ruff_python_formatter/src/string/docstring.rs:1235
↓ 21 callers
Method
resolve
Returns the re-mapped position or `position` if no mapping exists.
crates/ruff_linter/src/noqa.rs:1305
↓ 21 callers
Method
run
Run the benchmark using `hyperfine`.
scripts/ty_benchmark/src/benchmark/__init__.py:49
↓ 21 callers
Method
send
(&mut self, message: Message)
crates/ty_server/tests/e2e/main.rs:374
↓ 21 callers
Method
sum
(iter: I)
crates/ruff_text_size/src/size.rs:216
↓ 21 callers
Function
test_contents
A convenient wrapper around [`check_path`], that additionally asserts that fixes converge after a fixed number of iterations.
crates/ruff_linter/src/test.rs:245
↓ 21 callers
Method
to_lsp_range
( &self, db: &dyn Db, file: File, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:288
↓ 21 callers
Method
write_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 20 callers
Method
as_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1754
↓ 20 callers
Method
body
(self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:175
↓ 20 callers
Function
bool
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM210.py:12
↓ 20 callers
Method
concrete_base_type
Walk the `NewTypeBase` chain to find the underlying non-newtype `Type`. There might not be one if this `NewType` is cyclical, and we fall back to `obj
crates/ty_python_semantic/src/types/newtype.rs:104
↓ 20 callers
Method
constraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1295
↓ 20 callers
Function
contains_effect
Return `true` if the `Expr` contains an expression that appears to include a side-effect (like a function call). Accepts a closure that determines wh
crates/ruff_python_ast/src/helpers.rs:221
↓ 20 callers
Method
eat_char
(&mut self, c: char)
crates/ruff_python_trivia/src/cursor.rs:91
↓ 20 callers
Method
expression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:222
↓ 20 callers
Method
extend_from_slice
(&mut self, segments: &[&'a str])
crates/ruff_python_ast/src/name.rs:477
↓ 20 callers
Method
file_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:86
↓ 20 callers
Method
file_type
(&self)
crates/ruff_db/src/system.rs:307
↓ 20 callers
Method
find_positional
Return the positional argument at the given index, or `None` if no such argument exists.
crates/ruff_python_ast/src/nodes.rs:3564
↓ 20 callers
Method
fmt
(&self, expression: &Expr, f: &mut PyFormatter)
crates/ruff_python_formatter/src/expression/mod.rs:76
↓ 20 callers
Function
indentation
( logical_line: &LogicalLine, prev_logical_line: Option<&LogicalLine>, indent_char: char, inde
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/indentation.rs:269
↓ 20 callers
Function
infer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:133
↓ 20 callers
Method
is_known
Returns whether this is a known class.
crates/ty_python_semantic/src/types/class.rs:627
↓ 20 callers
Method
is_trivia
(&self)
crates/ruff_python_ast/src/token.rs:437
↓ 20 callers
Method
iter
Returns an iterator over the fixes in the map, along with the file path.
crates/ruff/src/diagnostics.rs:141
↓ 20 callers
Method
iter_mut
( &mut self, )
crates/ty_python_core/src/frozen.rs:18
↓ 20 callers
Method
keys
(&self)
crates/ty_python_core/src/frozen.rs:25
↓ 20 callers
Method
kind
(&self)
crates/ty_python_core/src/builder.rs:5263
↓ 20 callers
Method
kind
(&self)
crates/ty_ide/src/lib.rs:215
↓ 20 callers
Method
line_start
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:75
↓ 20 callers
Method
load
Loads a reference to the parsed module. Note that holding on to the reference will prevent garbage collection of the AST. This method will reparse th
crates/ruff_db/src/parsed.rs:130
↓ 20 callers
Method
matching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4136
↓ 20 callers
Method
ordered_source_order
Repeating a source-order tree cannot change the first occurrence of any constraint, so combining identical trees must reuse their existing sidecar.
crates/ty_python_semantic/src/types/constraints.rs:1404
↓ 20 callers
Method
prefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1076
↓ 20 callers
Method
push
Pushes a new [`Binding`] and returns its [`BindingId`].
crates/ruff_python_semantic/src/binding.rs:466
↓ 20 callers
Method
push
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:476
↓ 20 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:486
↓ 20 callers
Method
remove
(self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:24
↓ 20 callers
Function
remove_argument
Generic function to remove arguments or keyword arguments in function calls and class definitions. (For classes, `args` should be considered `bases`.)
crates/ruff_linter/src/fix/edits.rs:208
↓ 20 callers
Method
scope
(&self)
crates/ty_python_semantic/src/types/context.rs:78
↓ 20 callers
Method
to_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:5969
↓ 20 callers
Method
to_notebook_or_file
(&self, db: &dyn Db)
crates/ty_server/src/session.rs:1403
← previous
next →
601–700 of 28,410, ranked by callers