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
↓ 4 callers
Function
is_special_assignment
Returns `true` if this is a "special" assignment which must have a value (e.g., an assignment to `__all__`).
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:472
↓ 4 callers
Method
is_standard
Returns `true` if the parameters are a standard parameter list (not gradual, top, `ParamSpec`, or `Concatenate`).
crates/ty_python_semantic/src/types/signatures.rs:5296
↓ 4 callers
Method
is_static_sequent_eligible
Returns whether this type can participate in a transitive sequent proof. Gradual assignability is not transitive, so constraints with dynamic bounds
crates/ty_python_semantic/src/types/constraints/sequents.rs:2155
↓ 4 callers
Function
is_stub_body
Returns `true` if all statements in `body` are `pass` or `...` (ellipsis) An empty body (`[]`) returns `false`
crates/ruff_python_ast/src/helpers.rs:1262
↓ 4 callers
Method
is_subtyping
(self)
crates/ty_python_semantic/src/types/relation.rs:180
↓ 4 callers
Function
is_top_level_expression_in_statement
Returns `true` if the given call is a top-level expression in its statement. This means the call's return value is not used, so return type changes do
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:221
↓ 4 callers
Method
is_type_expression_explanation
(&self)
crates/ty_python_semantic/src/types/context.rs:315
↓ 4 callers
Function
is_type_var_like_call
Returns `true` if an [`Expr`] appears to be `TypeVar`, `TypeVarTuple`, `NewType`, or `ParamSpec` call. See also [`ruff_python_semantic::analyze::typi
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:453
↓ 4 callers
Method
is_typealias_special_form
(&self)
crates/ty_python_semantic/src/types.rs:2732
↓ 4 callers
Method
is_unicode
Returns `true` if the string literal has a `u` prefix, e.g. `u"foo"`. Although all strings in Python 3 are valid unicode (and the `u` prefix is only
crates/ruff_python_ast/src/nodes.rs:1600
↓ 4 callers
Method
is_unreachable
(&self, stmt: &ast::Stmt)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1140
↓ 4 callers
Method
is_unresolved_import
If the call path is dot-prefixed, it's an unresolved relative import. Ex) `[".foo", "bar"]` -> `".foo.bar"`
crates/ruff_python_ast/src/name.rs:369
↓ 4 callers
Method
is_unspecified
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:566
↓ 4 callers
Method
is_used
Is the symbol used in its containing scope?
crates/ty_python_core/src/symbol.rs:66
↓ 4 callers
Method
is_valid
(&self)
crates/ruff_python_ast/src/nodes.rs:438
↓ 4 callers
Method
is_valid
(&self)
crates/ty_python_semantic/src/types/constraints.rs:4965
↓ 4 callers
Method
iter
(&self)
crates/ty_python_core/src/frozen.rs:46
↓ 4 callers
Method
iter
(&self)
crates/ty_ide/src/lib.rs:250
↓ 4 callers
Method
iter
(&self)
crates/ty_python_semantic/src/suppression.rs:443
↓ 4 callers
Method
iter_clauses
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:1892
↓ 4 callers
Method
iter_enabled
Returns an iterator over all enabled rules.
crates/ruff_linter/src/settings/rule_table.rs:50
↓ 4 callers
Method
iter_mut
Returns a mutable iterator over the parts of this f-string, in source order.
crates/ruff_python_ast/src/nodes.rs:603
↓ 4 callers
Method
iter_negative
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1500
↓ 4 callers
Method
iterable
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1291
↓ 4 callers
Method
key_from_uri
(&self, uri: Uri)
crates/ruff_server/src/session/index.rs:127
↓ 4 callers
Method
key_type
Returns the type of keys that may be present in this `TypedDict`. A closed `TypedDict` has a finite set of literal keys. Open and extra-items `TypedD
crates/ty_python_semantic/src/types/typed_dict.rs:383
↓ 4 callers
Method
keywords
Return an iterator over the metaclass keywords of the class.
crates/ruff_python_ast/src/nodes.rs:42
↓ 4 callers
Method
kind
Determine whether this module is a single-file module or a package
crates/ty_module_resolver/src/module.rs:136
↓ 4 callers
Method
known
Is this a module that we special-case somehow? If so, which one?
crates/ty_module_resolver/src/module.rs:89
↓ 4 callers
Function
known_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2246
↓ 4 callers
Method
lacks_instance_storage
Whether a known slotted layout has no instance storage available for `name`. An unknown layout remains permissive, as do builtins whose C-level stora
crates/ty_python_semantic/src/types/class/slots.rs:532
↓ 4 callers
Method
last
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the file is at the end of the file.
crates/ruff_python_trivia/src/cursor.rs:67
↓ 4 callers
Method
last_child_in_body
The last child of the last branch, if the node has multiple branches.
crates/ruff_python_ast/src/node.rs:590
↓ 4 callers
Method
last_definition_signature
Typed externally-visible signature of the last overload or implementation of this function. ## Warning This uses the semantic index to find the defi
crates/ty_python_semantic/src/types/function.rs:1030
↓ 4 callers
Method
leading_index
(&self)
crates/ruff_python_formatter/src/comments/map.rs:519
↓ 4 callers
Method
leading_range
(&self)
crates/ruff_python_formatter/src/comments/map.rs:476
↓ 4 callers
Method
level
Returns the indentation level
crates/ruff_formatter/src/printer/mod.rs:968
↓ 4 callers
Function
lines_after
Counts the empty lines between `offset` and the first non-whitespace character.
crates/ruff_python_trivia/src/tokenizer.rs:67
↓ 4 callers
Function
lines_after_ignoring_end_of_line_trivia
(offset: TextSize, code: &str)
crates/ruff_python_trivia/src/tokenizer.rs:118
↓ 4 callers
Function
lint_only
Generate a [`Diagnostic`] for each diagnostic triggered by the given source code.
crates/ruff_linter/src/linter.rs:427
↓ 4 callers
Method
lint_source
The source for the diagnostic (either the AST, the filesystem, or the physical lines).
crates/ruff_linter/src/registry.rs:269
↓ 4 callers
Function
list_modules
List all available top-level modules.
crates/ty_module_resolver/src/list.rs:15
↓ 4 callers
Function
literal_completions
( server: &mut TestServer, cell: &lsp_types::Uri, position: Position, )
crates/ty_server/tests/e2e/notebook.rs:875
↓ 4 callers
Method
log_guidance
Returns editor-specific guidance for finding logs. Different editors have different ways to access language server logs, so we provide tailored instr
crates/ty_server/src/session.rs:1750
↓ 4 callers
Method
log_level
(&self)
crates/ruff/src/args.rs:85
↓ 4 callers
Method
lower_bound
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:3410
↓ 4 callers
Method
magic_trailing_comma
(&self)
crates/ruff_python_formatter/src/options.rs:123
↓ 4 callers
Method
mapNavigationTargets
( links: LocationLink[], )
playground/ty/src/Editor/Editor.tsx:1041
↓ 4 callers
Function
map_member_lookup_type
( db: &'db dyn Db, result: MemberLookupResult<'db>, f: impl FnOnce(Type<'db>) -> Type<'db>, )
crates/ty_python_semantic/src/types.rs:1194
↓ 4 callers
Method
mark_bound
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/place.rs:441
↓ 4 callers
Method
mark_parameter
(&mut self)
crates/ty_python_core/src/symbol.rs:163
↓ 4 callers
Method
mark_used
(&mut self, suppression_id: FileSuppressionId)
crates/ty_python_semantic/src/types/diagnostic.rs:1735
↓ 4 callers
Function
match_arg
(call: &'a Call<'b>)
crates/ruff_linter/src/cst/matchers.rs:115
↓ 4 callers
Function
match_candidate_exclusion
Return `true` if the given candidates should be ignored based on the exclusion criteria.
crates/ruff_workspace/src/resolver.rs:872
↓ 4 callers
Function
match_indented_block
( suite: &'a mut Suite<'b>, )
crates/ruff_linter/src/cst/matchers.rs:193
↓ 4 callers
Method
matching_overloads_mut
Returns an iterator over all the mutable overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4747
↓ 4 callers
Method
materialize_impl
( self, db: &'db dyn Db, materialization_kind: MaterializationKind, visitor: &
crates/ty_python_semantic/src/types/generics.rs:1587
↓ 4 callers
Method
materialize_ref
Returns the materialized place state for immutable access. Call this instead of [`Self::materialize`] when the state will only be read. If the pendin
crates/ty_python_core/src/use_def.rs:1897
↓ 4 callers
Method
materialized_origin
Returns the class origin of a protocol with a pending materialization.
crates/ty_python_semantic/src/types/instance.rs:1825
↓ 4 callers
Method
may_be_data_descriptor
Returns whether this type should be considered a possible data descriptor. If this type is a union, returns true if _any_ element is a data descriptor
crates/ty_python_semantic/src/types.rs:5599
↓ 4 callers
Method
may_be_present
Returns `false` for optional fields whose declared type is uninhabited.
crates/ty_python_semantic/src/types/typed_dict.rs:3280
↓ 4 callers
Method
member_count
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:370
↓ 4 callers
Method
member_id_by_instance_attribute_name
(&self, name: &str)
crates/ty_python_core/src/place.rs:315
↓ 4 callers
Method
member_sources
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:69
↓ 4 callers
Method
members_in_scope_at
Builds a set of members in scope at the given AST node and position. Callers should use this routine to build "in scope members" to be used with repe
crates/ty_python_semantic/src/importer.rs:95
↓ 4 callers
Method
merge
Merge the given snapshot into the current state, reflecting that we might have taken either path to get here. The new state for each place should incl
crates/ty_python_core/src/use_def.rs:3237
↓ 4 callers
Method
merge
(&mut self, b: Self, reachability_constraints: &mut ReachabilityConstraintsBuilder)
crates/ty_python_core/src/use_def/place_state.rs:271
↓ 4 callers
Method
merged_specialization
Merge the alternatives into one closed specialization, discarding their correlations and completeness. Compatibility and diagnostic results use their
crates/ty_python_semantic/src/types/generics.rs:2618
↓ 4 callers
Method
message
Attach a message to this annotation. An annotation without a message will still have a presence in rendering. In particular, it will highlight the sp
crates/ruff_db/src/diagnostic/mod.rs:831
↓ 4 callers
Method
message
(&self)
crates/ty_wasm/src/lib.rs:908
↓ 4 callers
Method
model
(name: string)
playground/ty/src/Playground.tsx:767
↓ 4 callers
Function
module_type_symbols
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/place.rs:2587
↓ 4 callers
Method
mro_identity
Return the identity of this base for method-resolution-order construction. Specializations of a generic class share one runtime class and must occupy
crates/ty_python_semantic/src/types/class_base.rs:112
↓ 4 callers
Method
multiline
(&self)
crates/ty_python_semantic/src/types/display.rs:167
↓ 4 callers
Method
name
(self, name: String)
crates/ruff_server/src/server/schedule/thread.rs:48
↓ 4 callers
Method
name_in_file
Returns the name of this symbol as it exists in a file. When absent, there is no concrete symbol in a module somewhere. Instead, this represents impo
crates/ty_ide/src/all_symbols.rs:141
↓ 4 callers
Method
narrow
Narrows a binding while reusing projections and shared suffixes from earlier bindings.
crates/ty_python_semantic/src/reachability.rs:1231
↓ 4 callers
Method
narrowing_constraint
(&self)
crates/ty_python_core/src/use_def/place_state.rs:418
↓ 4 callers
Method
narrowing_evaluator
( &self, constraint: ScopedNarrowingConstraint, )
crates/ty_python_core/src/use_def.rs:1178
↓ 4 callers
Method
nearest_disjoint_base
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:1651
↓ 4 callers
Method
needs_parentheses
( &self, parent: AnyNodeRef, context: &PyFormatContext, )
crates/ruff_python_formatter/src/pattern/mod.rs:136
↓ 4 callers
Method
nesting
(&self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:50
↓ 4 callers
Method
new_module_name
Returns the new name of a resolved module affected by this batch. An exact file rename takes precedence over any directory rename that matches a pref
crates/ty_ide/src/will_rename.rs:234
↓ 4 callers
Method
next
(&mut self)
crates/ruff_formatter/src/printer/queue.rs:219
↓ 4 callers
Method
next
(&mut self)
crates/ty_python_semantic/src/types/set_theoretic.rs:1011
↓ 4 callers
Method
next_back
(&mut self)
crates/ruff_formatter/src/format_element.rs:442
↓ 4 callers
Method
next_sibling
(&self)
crates/ruff_python_ast/src/traversal.rs:69
↓ 4 callers
Method
node_key
(self)
crates/ty_python_core/src/scope.rs:342
↓ 4 callers
Function
non_terminal_call_predicates
( db: &'db dyn Db, scope: ScopeId<'db>, )
crates/ty_python_semantic/src/reachability.rs:684
↓ 4 callers
Function
non_type_parameter_parent
Returns a scope's lexical parent, skipping an intervening type-parameter scope.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1629
↓ 4 callers
Method
normalize
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:57
↓ 4 callers
Function
normalize_candidates
Orders candidates for the same module name by precedence and removes shadowed namespace packages. Regular packages and file modules shadow namespace
crates/ty_module_resolver/src/resolve.rs:1472
↓ 4 callers
Function
normalize_path_to
Convert any path to an absolute path (based on the specified project root).
crates/ruff_linter/src/fs.rs:39
↓ 4 callers
Function
normalize_string
( input: &str, start_offset: usize, new_flags: AnyStringFlags, escape_braces: bool, )
crates/ruff_python_formatter/src/string/normalize.rs:664
↓ 4 callers
Method
num_lines
(&self)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:135
↓ 4 callers
Method
object
Return a `ClassLiteral` representing the class `builtins.object`
crates/ty_python_semantic/src/types/class.rs:643
↓ 4 callers
Method
observe_line_outside_preformatted_block
Updates internal state for a line outside of any active preformatted block.
crates/ty_ide/src/docstring/document/preformatted.rs:118
↓ 4 callers
Method
offset
(&self)
crates/ruff_python_trivia/src/cursor.rs:27
↓ 4 callers
Method
offset
(&self)
crates/ruff_linter/src/docstrings/sections.rs:344
↓ 4 callers
Method
open_virtual_text_document
Send a `textDocument/didOpen` notification for an unsaved virtual document.
crates/ty_server/tests/e2e/main.rs:885
← previous
next →
3,401–3,500 of 31,766, ranked by callers