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
↓ 5 callers
Method
add_interior
(&mut self, node: InteriorNode)
crates/ty_python_core/src/narrowing_constraints.rs:193
↓ 5 callers
Method
add_negated_atom
( &mut self, predicate: ScopedPredicateId, )
crates/ty_python_core/src/narrowing_constraints.rs:253
↓ 5 callers
Method
add_standalone_expression
Record an expression that needs to be a Salsa ingredient, because we need to infer its type standalone (type narrowing tests, RHS of an assignment.)
crates/ty_python_core/src/builder.rs:2911
↓ 5 callers
Method
add_standalone_expression_impl
( &mut self, expression_node: &ast::Expr, expression_kind: ExpressionKind, ass
crates/ty_python_core/src/builder.rs:2952
↓ 5 callers
Function
all_end_of_scope_members
Iterate over all declarations and bindings that exist at the end of the given scope.
crates/ty_python_semantic/src/types/list_members.rs:34
↓ 5 callers
Method
ancestor_scopes
Returns an iterator over all ancestors of `scope`, starting with `scope` itself.
crates/ty_python_core/src/lib.rs:662
↓ 5 callers
Method
applicability
Return the [`Applicability`] of the [`Fix`].
crates/ruff_diagnostics/src/fix.rs:158
↓ 5 callers
Method
apply_changes
( &mut self, changes: Vec<lsp_types::TextDocumentContentChangeEvent>, new_version: Doc
crates/ruff_server/src/edit/text_document.rs:84
↓ 5 callers
Method
apply_optional_owner_specialization_to_member
Projects a member from its generic owner, applying the owner's specialization to both ordinary occurrences and the domain of any retained synthetic `S
crates/ty_python_semantic/src/types.rs:9777
↓ 5 callers
Method
as_ann_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:658
↓ 5 callers
Method
as_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:228
↓ 5 callers
Method
as_class_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:436
↓ 5 callers
Method
as_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:212
↓ 5 callers
Method
as_expression
Returns the [`Expr`] if this is a expression, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:101
↓ 5 callers
Method
as_full_str
(&self)
crates/ruff_source_file/src/newlines.rs:267
↓ 5 callers
Method
as_i64
Return the [`Int`] as an i64, if it can be represented as that data type.
crates/ruff_python_ast/src/int.rs:133
↓ 5 callers
Method
as_literal_expr
Returns [`LiteralExpressionRef`] if the expression is a literal expression.
crates/ruff_python_ast/src/nodes.rs:89
↓ 5 callers
Method
as_notebook
(&self)
crates/ruff_server/src/session/index.rs:522
↓ 5 callers
Method
as_paramspec_typevar
If this type is a `ParamSpec` type variable, returns it. Otherwise, returns `None`.
crates/ty_python_semantic/src/types.rs:7009
↓ 5 callers
Method
as_single_document
Attempt to access the single inner text document selected by the query. If this query is selecting an entire notebook document, this will return `None
crates/ruff_server/src/session/index.rs:650
↓ 5 callers
Method
as_slice
(&self)
crates/ruff_python_ast/src/name.rs:743
↓ 5 callers
Method
as_statement
Returns the [`Stmt`] if this is a statement, or `None` if the reference is to another kind of AST node.
crates/ruff_python_semantic/src/nodes.rs:92
↓ 5 callers
Method
as_str
(&self)
crates/ruff_python_codegen/src/stylist.rs:159
↓ 5 callers
Method
as_str
(self)
crates/ty_ide/src/docstring/markdown/structured.rs:134
↓ 5 callers
Method
as_system_path
(&self)
crates/ruff_db/src/files/path.rs:33
↓ 5 callers
Method
as_unary_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1755
↓ 5 callers
Method
as_vendored_path
(&self)
crates/ty_module_resolver/src/path.rs:832
↓ 5 callers
Method
as_writable
(&self)
crates/ty_test/src/db.rs:598
↓ 5 callers
Function
assert_bindings
(place: &PlaceState, expected: &[(u32, ScopedNarrowingConstraint)])
crates/ty_python_core/src/use_def/place_state.rs:800
↓ 5 callers
Function
assert_error_chain_eq
(error: ProjectMetadataError, message: &str)
crates/ty_project/src/metadata.rs:2156
↓ 5 callers
Function
assert_no_edits
(renames: &[(&str, &str)], sources: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:2450
↓ 5 callers
Method
assignable_solutions_with_inferable
Calculates the [`CandidateSolutions`] that represent the valid solutions for when `self` is constraint-set assignable to `target`.
crates/ty_python_semantic/src/types/constraints.rs:3611
↓ 5 callers
Method
assignment_holds
(&self, assignment: Assignment<AtomicConstraintId>)
crates/ty_python_semantic/src/types/constraints/paths.rs:567
↓ 5 callers
Method
associated_place_ids
(&self, place: ScopedPlaceId)
crates/ty_python_core/src/place.rs:371
↓ 5 callers
Method
at_identifier_or_soft_keyword
Returns `true` if the parser is at an identifier or soft keyword token.
crates/ruff_python_parser/src/parser/expression.rs:126
↓ 5 callers
Method
at_sequence_end
Returns `true` if the current token ends a sequence.
crates/ruff_python_parser/src/parser/expression.rs:141
↓ 5 callers
Function
attribute_write_requirement
Resolve the receiver-level requirements for writing `object_ty.attribute`. This expands aliases, preserves the all-arms rule for unions and the any-p
crates/ty_python_semantic/src/types/attribute_write.rs:344
↓ 5 callers
Function
autofix_with_notimplementederror
Add an autofix to `diagnostic` that replaces the given node with `NotImplementedError` iff `NotImplementedError` definitely has a builtin binding from
crates/ty_python_semantic/src/types/diagnostic.rs:3445
↓ 5 callers
Function
b
(arg: int)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:40
↓ 5 callers
Method
baseline
(&self)
crates/ty_project/src/metadata/settings.rs:45
↓ 5 callers
Function
binary_choice
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, typevar: BoundTypeVarInstance<'db>,
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:65
↓ 5 callers
Function
bind_attribute_self_typevars
Bind an annotation using the selected lookup class and the original receiver. A constrained type variable has no single nominal class. The concrete l
crates/ty_python_semantic/src/types/attribute_write.rs:1006
↓ 5 callers
Method
bind_self
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Type<'db>,
crates/ty_python_semantic/src/types/protocol_class.rs:1238
↓ 5 callers
Method
bind_self
Binds a method receiver, specializing its signatures and removing incompatible overloads. `typing_self_type` is used to replace `typing.Self`, which
crates/ty_python_semantic/src/types/callable.rs:961
↓ 5 callers
Method
bottom
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1710
↓ 5 callers
Method
builder
Returns a builder for tersely constructing diagnostics.
crates/ruff_db/src/diagnostic/render.rs:2678
↓ 5 callers
Method
bump
Moves the cursor to the next character, returning the previous character. Returns [`None`] if there is no next character.
crates/ruff_python_parser/src/lexer/cursor.rs:93
↓ 5 callers
Method
bump_back
Consumes the next character from the back
crates/ruff_python_trivia/src/cursor.rs:99
↓ 5 callers
Function
can_rename
Returns the range of the symbol if it can be renamed, None if not.
crates/ty_ide/src/rename.rs:10
↓ 5 callers
Method
canonical_module
Return the module in which we should look up the definition for this class
crates/ty_python_semantic/src/types/class/known.rs:1525
↓ 5 callers
Method
canonicalize
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:96
↓ 5 callers
Function
catch
(db: &dyn Db, file: File, f: F)
crates/ty_project/src/lib.rs:1126
↓ 5 callers
Method
category
(&self, in_stub: bool, module: &ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1136
↓ 5 callers
Method
category
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition_resolution.rs:70
↓ 5 callers
Method
check_class_pair
( &self, db: &'db dyn Db, source: ClassType<'db>, target: ClassType<'db>,
crates/ty_python_semantic/src/types/class.rs:2636
↓ 5 callers
Function
check_file_unwrap
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/lib.rs:229
↓ 5 callers
Method
check_specialization_pair
( &self, db: &'db dyn Db, source: Specialization<'db>, target: Specialization<
crates/ty_python_semantic/src/types/generics.rs:1727
↓ 5 callers
Method
choose
(&self, preferred_quote: Quote)
crates/ruff_python_formatter/src/string/normalize.rs:336
↓ 5 callers
Method
class_literal_and_specialization
Returns the underlying class literal and specialization, if any. For a non-generic class, this returns the class literal directly. For a generic alia
crates/ty_python_semantic/src/types/class.rs:1258
↓ 5 callers
Method
clear_env_vars
Clears the inherited environment and any previously set variables.
crates/ruff_db/src/system/test.rs:49
↓ 5 callers
Method
clone
(&self)
crates/ruff_formatter/src/arguments.rs:10
↓ 5 callers
Method
close
De-registers a document, specified by its key. Calling this multiple times for the same document is a logic error. Returns `true` if the client needs
crates/ty_server/src/session.rs:2193
↓ 5 callers
Method
collect_hints
(&self, settings: &InlayHintSettings)
crates/ty_ide/src/inlay_hints.rs:1331
↓ 5 callers
Function
combine_definite_truthiness
Combine results when the caller only needs definite truthiness. Any ambiguous or narrowing result, or any disagreement between definite results, make
crates/ty_python_semantic/src/types/equality.rs:1357
↓ 5 callers
Method
config_file_override
Returns the explicit configuration file that replaces normal project discovery, if any.
crates/ty_project/src/metadata.rs:414
↓ 5 callers
Method
contains_definition
Returns `true` if this function includes `definition` as one of its overload signatures or implementation.
crates/ty_python_semantic/src/types/function.rs:1656
↓ 5 callers
Method
contains_member
Return whether `name` is an enum member, including aliases.
crates/ty_python_semantic/src/types/enums.rs:532
↓ 5 callers
Method
context_result
Returns the diagnostics and semantic validity of this unpacking assignment.
crates/ty_python_semantic/src/types/unpacker.rs:402
↓ 5 callers
Method
count_lines
The number of lines `range` spans. ## Examples ``` # use ruff_text_size::{Ranged, TextRange}; # use ruff_source_file::LineRanges; assert_eq!("a\nb"
crates/ruff_source_file/src/line_ranges.rs:314
↓ 5 callers
Function
create_compacted_owned_set
(db: &TestDb)
crates/ty_python_semantic/src/types/constraints.rs:7283
↓ 5 callers
Function
create_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2237
↓ 5 callers
Function
create_typevar
(db: &'db TestDb, name: &str)
crates/ty_python_semantic/src/types/constraints/resolution.rs:263
↓ 5 callers
Function
create_workspace_server_with_file
Helper functions for long-polling tests
crates/ty_server/tests/e2e/pull_diagnostics.rs:1564
↓ 5 callers
Method
current
(&self)
crates/ruff_python_parser/src/lexer/indentation.rs:125
↓ 5 callers
Method
decorators
Return the types of the decorators on this class
crates/ty_python_semantic/src/types/class/static_literal.rs:815
↓ 5 callers
Method
default
(&self)
crates/ty_python_semantic/src/types/signatures.rs:6384
↓ 5 callers
Method
definition
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2479
↓ 5 callers
Method
definition
(&self)
crates/ty_python_semantic/src/types/definition_resolution.rs:83
↓ 5 callers
Method
defuse
Consume the underlying `Diagnostic` without emitting it. In general you should avoid constructing diagnostics that may not be emitted, but this metho
crates/ruff_linter/src/checkers/ast/mod.rs:3834
↓ 5 callers
Function
delete_comment
Generate a [`Edit`] to delete a comment (for example: a `noqa` directive).
crates/ruff_linter/src/fix/edits.rs:67
↓ 5 callers
Function
dependency_workspace_case
()
crates/ty/tests/cli/uv_workspace.rs:148
↓ 5 callers
Function
derive_impl
(input: DeriveInput)
crates/ruff_macros/src/config.rs:12
↓ 5 callers
Function
descriptor_setter_domain
Derive the values accepted by every possible descriptor setter when they fit in [`Type`].
crates/ty_python_semantic/src/types/attribute_write.rs:1326
↓ 5 callers
Method
difference
(db: &'db dyn Db, types: TypePair<'db>)
crates/ty_python_semantic/src/types/set_theoretic.rs:1200
↓ 5 callers
Method
discard_disjoint_union_elements
If the type is a union, removes union elements that are disjoint from `target`. Returns [`DiscardDisjointUnionElementsResult::AllDisjoint`] if every
crates/ty_python_semantic/src/types.rs:3680
↓ 5 callers
Function
discovery_test
(source: &str)
crates/ty_ide/src/pytest_test_discovery.rs:317
↓ 5 callers
Method
display
Return a `std::fmt::Display` implementation that renders this diagnostic in the full, human-readable format. Note that this `Display` impl includes a
crates/ruff_db/src/diagnostic/mod.rs:215
↓ 5 callers
Method
display
(&self, source: &'src str)
crates/ruff_linter/src/rules/refurb/helpers.rs:165
↓ 5 callers
Method
do_bump
Moves the parser to the next token.
crates/ruff_python_parser/src/parser/mod.rs:358
↓ 5 callers
Function
dunder_all_names
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/dunder_all.rs:16
↓ 5 callers
Method
dunder_class
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:9672
↓ 5 callers
Method
durability
(self, db: &dyn Db)
crates/ruff_db/src/files/file_root.rs:26
↓ 5 callers
Method
dynamic_class_scope_offset
Identify a dangling dynamic-class call without retaining an absolute source position.
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:40
↓ 5 callers
Method
eager_default_type
Returns a default type stored directly in the signature, without running inference. Deferred source defaults return `None`, even if their type is alre
crates/ty_python_semantic/src/types/signatures.rs:6402
↓ 5 callers
Method
emit
(&mut self, text: &dyn Debug)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:217
↓ 5 callers
Function
empty_parenthesized
Format comments inside empty parentheses, brackets or curly braces. Empty `()`, `[]` and `{}` are special because there can be dangling comments, and
crates/ruff_python_formatter/src/expression/parentheses.rs:384
↓ 5 callers
Function
end_of_statement
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET503.py:299
↓ 5 callers
Method
ensure_overlay_identity_caches
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:1125
↓ 5 callers
Method
entries
(&mut self, items: I)
crates/ty_python_semantic/src/types/display.rs:513
↓ 5 callers
Method
evaluate_expression_node_predicate
( &mut self, expression_node: &ruff_python_ast::Expr, expression: Expression<'db>,
crates/ty_python_semantic/src/types/narrow.rs:1745
← previous
next →
2,601–2,700 of 31,766, ranked by callers