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
↓ 9 callers
Function
filter
()
docs/js/rule-filters.js:149
↓ 9 callers
Function
find_binding_value
(binding: &Binding, semantic: &'a SemanticModel)
crates/ruff_python_semantic/src/analyze/typing.rs:1244
↓ 9 callers
Method
finish
(mut self)
crates/ty_python_semantic/src/types/constraints/solutions.rs:1858
↓ 9 callers
Method
fmt_detailed
(&self, writer: &mut TypeWriter<'_, '_, 'db>)
crates/ty_python_semantic/src/types/display.rs:471
↓ 9 callers
Method
function_type
(&self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer.rs:1927
↓ 9 callers
Method
get
Returns the value as a primitive type.
crates/ruff_source_file/src/line_index.rs:599
↓ 9 callers
Method
get
(&self)
crates/ruff_linter/src/line_width.rs:182
↓ 9 callers
Method
goto_declaration
Apply the "goto declaration" interpretation to these definitions.
crates/ty_ide/src/goto.rs:287
↓ 9 callers
Method
has_comments
Returns `true` if a statement or expression includes at least one comment.
crates/ruff_python_trivia/src/comment_ranges.rs:109
↓ 9 callers
Method
has_explicit_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:222
↓ 9 callers
Method
has_typevar
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:66
↓ 9 callers
Function
hash
FNV
crates/ruff_unicode_names2_generator/src/phf.rs:11
↓ 9 callers
Method
hash
(&self, state: &mut H)
crates/ruff_cache/tests/cache_key.rs:55
↓ 9 callers
Method
headline_message
Returns the headline message for this diagnostic. A diagnostic always has a message, but it may be empty.
crates/ruff_db/src/diagnostic/mod.rs:233
↓ 9 callers
Method
import
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, graph: RecursiveTypeG
crates/ty_python_semantic/src/types/recursive.rs:231
↓ 9 callers
Method
in_async_context
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:929
↓ 9 callers
Method
in_string_type_definition
Return `true` if the model is visiting a "string type definition" that was previously deferred when initially traversing the AST
crates/ruff_python_semantic/src/model.rs:2154
↓ 9 callers
Method
in_type_definition
Return `true` if the model is in a type definition.
crates/ruff_python_semantic/src/model.rs:2148
↓ 9 callers
Method
includes_member
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types/protocol_class.rs:537
↓ 9 callers
Method
indentation
(&self)
crates/ruff_python_codegen/src/stylist.rs:19
↓ 9 callers
Method
index
(&self)
crates/ruff_source_file/src/lib.rs:169
↓ 9 callers
Function
infer_deferred_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:424
↓ 9 callers
Method
infer_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6920
↓ 9 callers
Method
intersect_types
(&self, left: Type<'db>, right: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:3495
↓ 9 callers
Method
into_absolute
Anchors pattern at `cwd`. `is_exclude` indicates whether this is a pattern in an exclude filter. This method similar to [`SystemPath::absolute`] but
crates/ty_project/src/glob/portable.rs:137
↓ 9 callers
Method
into_enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:325
↓ 9 callers
Method
into_inner
(self)
crates/ruff_ranged_value/src/lib.rs:217
↓ 9 callers
Method
into_inner
(self)
crates/ty_python_semantic/src/types.rs:2324
↓ 9 callers
Method
into_iter
(self)
crates/ruff_python_semantic/src/definition.rs:306
↓ 9 callers
Method
into_iter
(self)
crates/ruff/src/commands/completions/config.rs:18
↓ 9 callers
Method
into_settings
(self, client: Client)
crates/ruff_server/src/session/options.rs:70
↓ 9 callers
Method
is_ambiguous
(self)
crates/ty_python_core/src/lib.rs:993
↓ 9 callers
Method
is_builtin
If the first segment is empty, the `CallPath` represents a "builtin binding". A builtin binding is the binding that a symbol has if it was part of Py
crates/ruff_python_ast/src/name.rs:363
↓ 9 callers
Method
is_closed
Return whether this set excludes every value not named by its representation. A whole-domain or complement representation is not closed for an enum t
crates/ty_python_semantic/src/types/equality/enums.rs:566
↓ 9 callers
Method
is_context_collection_enabled
Return true if error context collection is currently enabled.
crates/ty_python_semantic/src/types/relation.rs:1879
↓ 9 callers
Function
is_dotted_name
(expr: &ast::Expr)
crates/ruff_python_ast/src/helpers.rs:1836
↓ 9 callers
Method
is_eager
(&self)
crates/ty_python_core/src/scope.rs:174
↓ 9 callers
Method
is_empty
(self)
crates/ty_module_resolver/src/resolve.rs:516
↓ 9 callers
Method
is_function_def
(&self)
crates/ty_python_core/src/definition.rs:1007
↓ 9 callers
Method
is_function_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:39
↓ 9 callers
Method
is_method
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2192
↓ 9 callers
Method
is_multiline
(self)
crates/ruff_python_formatter/src/other/interpolated_string.rs:24
↓ 9 callers
Method
is_nonlocal
Return `true` if this [`Binding`] represents a `nonlocal`. A [`Binding`] is a `nonlocal` if it's declared by a `nonlocal` statement, or shadows a [`Bi
crates/ruff_python_semantic/src/binding.rs:83
↓ 9 callers
Function
is_pathlib_path_call
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:15
↓ 9 callers
Method
is_positional_only
Returns `true` if this is a positional-only parameter.
crates/ty_python_semantic/src/types/signatures.rs:6267
↓ 9 callers
Method
is_symbol
Returns `true` if the reference is a `Symbol`, otherwise `false`.
crates/ty_python_core/src/place.rs:121
↓ 9 callers
Method
is_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2725
↓ 9 callers
Method
is_unused
Returns `true` if the given expression is an unused variable, or consists solely of references to other unused variables. This method is conservative
crates/ruff_python_semantic/src/model.rs:1985
↓ 9 callers
Method
is_used
Return `true` if this [`Binding`] is used. This method is the opposite of [`Binding::is_unused`].
crates/ruff_python_semantic/src/binding.rs:48
↓ 9 callers
Method
iter_enumerated
( &self, )
crates/ty_python_core/src/use_def.rs:788
↓ 9 callers
Method
kind
(&self)
crates/ruff_formatter/src/format_element/tag.rs:129
↓ 9 callers
Method
left
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1228
↓ 9 callers
Method
len
The number of bytes in the name. All names are plain ASCII, so this is also the number of Unicode codepoints and the number of graphemes.
crates/ruff_unicode_names2/src/lib.rs:130
↓ 9 callers
Method
len
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/generics.rs:897
↓ 9 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:840
↓ 9 callers
Function
lex_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1800
↓ 9 callers
Method
line_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:162
↓ 9 callers
Method
line_index
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:54
↓ 9 callers
Method
lint_file_with_cache
( &self, path: &str, cache: &Cache, )
crates/ruff/src/cache.rs:1059
↓ 9 callers
Function
log
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB163.py:36
↓ 9 callers
Method
lookup_attribute
Lookup a qualified attribute in the current scope. For example, given `["Class", "method"`], resolve the `BindingKind::ClassDefinition` associated wi
crates/ruff_python_semantic/src/model.rs:1083
↓ 9 callers
Method
materialization_kind
(self)
crates/ty_python_semantic/src/types.rs:11982
↓ 9 callers
Function
module
Run lint rules over a module.
crates/ruff_linter/src/checkers/ast/analyze/module.rs:8
↓ 9 callers
Function
name
Find the name of `c`, or `None` if `c` has no name. The return value is an iterator that yields `&str` components of the name successively (including
crates/ruff_unicode_names2/src/lib.rs:218
↓ 9 callers
Method
name
Get the name of a type qualifier. Note that this function can only be called on sets with a single member. Panics if more than a single bit is set.
crates/ty_python_semantic/src/types.rs:12095
↓ 9 callers
Function
nearest_enclosing_class
Returns the type of the nearest enclosing class for the given scope. This function walks up the ancestor scopes starting from the given scope, and fi
crates/ty_python_semantic/src/types/infer.rs:920
↓ 9 callers
Function
never
()
crates/ty_python_semantic/resources/corpus/88_regression_tuple_type_short_circuit.py:13
↓ 9 callers
Method
next_back
(&mut self)
crates/ruff_python_ast/src/nodes.rs:335
↓ 9 callers
Method
node_support
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1604
↓ 9 callers
Method
overloads
Returns all overloads for this call binding, including overloads that did not match.
crates/ty_python_semantic/src/types/call/bind.rs:4656
↓ 9 callers
Method
own_fields
Returns a map of all annotated attributes defined in the body of this class. This extends the `__annotations__` attribute at runtime by also including
crates/ty_python_semantic/src/types/class/static_literal.rs:2795
↓ 9 callers
Method
owner
(&self, db: &'db dyn Db, module: Module<'db>)
crates/ty_python_semantic/src/dependency.rs:234
↓ 9 callers
Method
parameters
Return the parameters in this signature.
crates/ty_python_semantic/src/types/signatures.rs:1331
↓ 9 callers
Function
parse_unchecked_source
Like [`ruff_python_parser::parse_unchecked_source`], but with an explicit [`PythonVersion`] and per-cell notebook parsing. Per-cell modules are merge
crates/ruff_linter/src/linter.rs:753
↓ 9 callers
Method
path
(&self, _file: File)
crates/ruff_linter/src/message/mod.rs:139
↓ 9 callers
Method
peek
Returns the next token kind without consuming it.
crates/ruff_python_parser/src/parser/mod.rs:380
↓ 9 callers
Method
push_error
Helper function to push the given error, updating the current range with the error location and return the [`TokenKind::Unknown`] token.
crates/ruff_python_parser/src/lexer.rs:137
↓ 9 callers
Method
puts
Sets `string` with `style` for given `line`, starting from `col`. If `line` does not exist in our buffer, adds empty lines up to the given and fills t
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:87
↓ 9 callers
Method
python_version
(&self)
crates/ty_python_semantic/src/db.rs:103
↓ 9 callers
Method
quote_style
(&self)
crates/ruff_python_formatter/src/options.rs:127
↓ 9 callers
Method
range
(&self)
crates/ruff_python_ast/src/nodes.rs:242
↓ 9 callers
Method
reduce
(self)
crates/ruff_python_stdlib/src/open_mode.rs:77
↓ 9 callers
Function
resolve_assignment
Return the [`QualifiedName`] of the value to which the given [`Expr`] is assigned, if any. For example, given: ```python import asyncio loop = async
crates/ruff_python_semantic/src/analyze/typing.rs:1186
↓ 9 callers
Method
resolver_environment
Returns the module-resolution environment for this program file.
crates/ty_python_core/src/program_file.rs:80
↓ 9 callers
Method
result_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Type
crates/ty_python_semantic/src/types/protocol_class.rs:1635
↓ 9 callers
Method
right
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1232
↓ 9 callers
Function
rule
Explain a `Rule` to the user.
crates/ruff/src/commands/rule.rs:102
↓ 9 callers
Method
scope
(&self, id: FileScopeId)
crates/ty_python_core/src/lib.rs:488
↓ 9 callers
Method
scope_kind
(&self)
crates/ty_python_core/src/scope.rs:398
↓ 9 callers
Function
sequence_pattern_type_builder
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:172
↓ 9 callers
Method
show_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ty_server/src/session/client.rs:210
↓ 9 callers
Method
site_packages_paths
( &self, system: &dyn System, )
crates/ty_site_packages/src/lib.rs:431
↓ 9 callers
Method
skip_bytes
Skips the next `count` bytes. ## Panics - If `count` is larger than the remaining bytes in the input stream. - If `count` indexes into a multi-byte c
crates/ruff_python_parser/src/lexer/cursor.rs:162
↓ 9 callers
Function
skip_chars
(src: str, pos: Pos, chars: Iterable[str])
crates/ruff_benchmark/resources/tomllib/_parser.py:232
↓ 9 callers
Method
slot_names
Returns this class's explicit or generated slot names when they are statically known. Inherited slots are excluded; callers that need the complete la
crates/ty_python_semantic/src/types/class/slots.rs:243
↓ 9 callers
Function
soft_line_break_or_space
()
crates/ruff_formatter/src/builders.rs:190
↓ 9 callers
Method
source
(&self)
crates/ty_project/src/metadata/value.rs:56
↓ 9 callers
Method
source_location
( &self, offset: TextSize, position_encoding: PositionEncoding, )
crates/ruff_source_file/src/lib.rs:44
↓ 9 callers
Method
source_types
The inferred type of the source expression, before unpacking its elements.
crates/ty_python_semantic/src/types/call/arguments.rs:107
↓ 9 callers
Method
sys_prefix
Returns the canonical, absolute `sys.prefix` of this environment.
crates/ty_site_packages/src/lib.rs:414
← previous
next →
1,701–1,800 of 31,766, ranked by callers