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
↓ 2 callers
Method
is_typed_dict_subclass
Return `true` if this class is a (true) subclass of `typing.TypedDict`.
crates/ty_python_semantic/src/types/class/known.rs:586
↓ 2 callers
Method
is_typevartuple_or_instance
A bound type variable tuple, or the runtime object for an unbound legacy declaration.
crates/ty_python_semantic/src/types/typevar.rs:56
↓ 2 callers
Method
is_typing
(self)
crates/ty_python_semantic/src/types/infer/builder/named_tuple.rs:767
↓ 2 callers
Method
is_u_string
(&self)
crates/ruff_linter/src/docstrings/mod.rs:57
↓ 2 callers
Method
is_unary_op_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1726
↓ 2 callers
Method
is_unchanged_or
(self, predicate: impl FnOnce(T) -> bool)
crates/ty_python_semantic/src/types/recursive.rs:744
↓ 2 callers
Method
is_undefined_or
(self, f: impl Fn(Definition<'db>) -> bool)
crates/ty_python_core/src/definition.rs:327
↓ 2 callers
Function
is_underscore_prefixed_public_member
Returns `true` if a module member is public despite having an underscore-prefixed name.
crates/ruff_linter/src/rules/pylint/helpers.rs:14
↓ 2 callers
Method
is_unknown
(self)
crates/ty_site_packages/src/lib.rs:702
↓ 2 callers
Method
is_unpacked_assignment
Return `true` if this [`Binding`] represents an unpacked assignment (e.g., `x` in `(x, y) = 1, 2`).
crates/ruff_python_semantic/src/binding.rs:112
↓ 2 callers
Method
is_unsupported
Returns whether or not this kind of syntax is unsupported on `target_version`.
crates/ruff_python_parser/src/error.rs:1144
↓ 2 callers
Function
is_untyped_exception
(type_: Option<&Expr>, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:22
↓ 2 callers
Function
is_up006_future_annotations_fix_enabled
https://github.com/astral-sh/ruff/pull/23260
crates/ruff_linter/src/preview.rs:333
↓ 2 callers
Function
is_upper_case_z_string
(expr: &Expr)
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:266
↓ 2 callers
Function
is_valid_annotation_target
Returns whether a variable annotation is allowed on this assignment target. Names and attributes of an implicit method receiver (such as `self.x` or `
crates/ty_python_semantic/src/types/annotation_target.rs:16
↓ 2 callers
Function
is_valid_default_value_without_annotation
Returns `true` if an [`Expr`] appears to be a valid default value without an annotation.
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:437
↓ 2 callers
Method
is_valid_extension
(&self, extension: &str)
crates/ty_module_resolver/src/path.rs:744
↓ 2 callers
Method
is_valid_in_typeddict_field
(self)
crates/ty_python_semantic/src/types/special_form.rs:1113
↓ 2 callers
Method
is_valid_isinstance_target
Return `true` if this special form is valid as the second argument to `issubclass()` and `isinstance()` calls.
crates/ty_python_semantic/src/types/special_form.rs:637
↓ 2 callers
Function
is_valid_pep_604_union
Returns `true` if an [`Expr`] appears to be a valid PEP 604 union. (e.g. `int | None`)
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:404
↓ 2 callers
Function
is_value_from_context_key
Check if an expression is or resolves to an access of a specific context key. Returns `true` if `expr` is: - Direct access: `context["key"]` or `cont
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1301
↓ 2 callers
Method
is_virtual
Returns `true` if this is a virtual environment (has a `pyvenv.cfg` file).
crates/ty_site_packages/src/lib.rs:456
↓ 2 callers
Method
is_with_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:777
↓ 2 callers
Method
is_yes
(self)
crates/ruff_python_formatter/src/range.rs:609
↓ 2 callers
Method
is_yes
(self)
crates/ty_python_semantic/src/place.rs:2700
↓ 2 callers
Method
is_yes
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:3507
↓ 2 callers
Method
is_zero
(&self)
crates/ruff_python_ast/src/comparable.rs:2191
↓ 2 callers
Method
ite_uncertain
Returns the TDD `if-then-else` of four BDDs: when `self` evaluates to `true`, it returns what `then_node` evaluates to; when `self` evaluates to `fals
crates/ty_python_semantic/src/types/constraints.rs:2787
↓ 2 callers
Method
iter
(&self)
crates/ty_project/src/files.rs:199
↓ 2 callers
Method
iter
(&self)
crates/ruff_python_literal/src/cformat.rs:349
↓ 2 callers
Method
iter_constructor_items
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1071
↓ 2 callers
Method
iter_content
Iterates over all elements until it finds the matching end tag of the specified kind.
crates/ruff_formatter/src/printer/queue.rs:52
↓ 2 callers
Method
iter_lines
(&self)
crates/mdtest/src/diagnostic.rs:78
↓ 2 callers
Method
iter_matches
Return an iterator over the entries in `self` that match the input `path`. `debug_label` is used for [`debug!`] messages explaining why certain patte
crates/ruff_linter/src/settings/types.rs:831
↓ 2 callers
Method
iter_mro
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/bound_super.rs:340
↓ 2 callers
Method
iter_mro
Iterate over the MRO of this class using C3 linearization. The MRO includes the class itself as the first element, followed by the merged base class
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:384
↓ 2 callers
Method
iter_mut
(&mut self)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:811
↓ 2 callers
Function
iter_super_class
Returns an iterator over all base classes, beginning with the given class. The traversal of the class hierarchy is breadth-first, since this graph te
crates/ruff_python_semantic/src/analyze/class.rs:86
↓ 2 callers
Method
iter_symbol_stack
(&self)
crates/ty_ide/src/symbols.rs:1227
↓ 2 callers
Method
iter_validity
(&self)
crates/ty_python_semantic/src/types/constraints.rs:1912
↓ 2 callers
Method
iter_values
Returns an `Iterator` over the AST nodes representing the dictionary's values.
crates/ruff_python_ast/src/nodes.rs:259
↓ 2 callers
Function
iteration_over_set
PLC0208
crates/ruff_linter/src/rules/pylint/rules/iteration_over_set.rs:49
↓ 2 callers
Method
joined_name
(&self, contracted: bool)
crates/mdtest/src/parser.rs:108
↓ 2 callers
Method
kind
(&self)
crates/ruff_db/src/system/walk_directory.rs:219
↓ 2 callers
Method
kind
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:96
↓ 2 callers
Method
known_class_literal_bindings
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, class: ClassLiteral<'d
crates/ty_python_semantic/src/types.rs:7728
↓ 2 callers
Function
known_literal_equality
Return the comparison result for two literals when their runtime values determine it. This accounts for integer/boolean equality, enum aliases or enu
crates/ty_python_semantic/src/types/equality.rs:2166
↓ 2 callers
Function
known_type_form_parameter_index
These are the callables whose arguments were historically classified as type expressions. TODO: Generalize this once call binding records the interpre
crates/ty_python_semantic/src/types/ide_support.rs:1274
↓ 2 callers
Method
l_paren_range
(&self)
crates/ruff_python_ast/src/nodes.rs:3842
↓ 2 callers
Method
label
(&self)
crates/ty_python_semantic/src/types/display.rs:462
↓ 2 callers
Method
last_tcx
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:13187
↓ 2 callers
Method
last_usable_python_environment
The selected environment, or the last usable one if resolution failed.
crates/ty_python_core/src/program.rs:81
↓ 2 callers
Function
lax_input_type_impl
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, field_type: Type<'db>, expanding_types: &mut
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:1158
↓ 2 callers
Method
laziness
(self)
crates/ty_python_core/src/scope.rs:231
↓ 2 callers
Method
lazy_bound
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:682
↓ 2 callers
Method
lazy_constraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:740
↓ 2 callers
Method
lazy_default_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, visitor: &TypeVarDefau
crates/ty_python_semantic/src/types/typevar.rs:856
↓ 2 callers
Method
leading
The text between the `{` and the expression node.
crates/ruff_python_ast/src/nodes.rs:531
↓ 2 callers
Function
leading_alternate_branch_comments
Formats the leading `comments` of an alternate branch and ensures that it preserves the right number of empty lines before. The `last_node` is the las
crates/ruff_python_formatter/src/comments/format.rs:69
↓ 2 callers
Method
leading_binary_comments
Comments of the outer-most enclosing binary expression.
crates/ruff_python_formatter/src/expression/binary_like.rs:828
↓ 2 callers
Function
leading_quote
Return the leading quote for a string, template, or bytes literal (e.g., `"""`).
crates/ruff_python_ast/src/str.rs:303
↓ 2 callers
Function
leading_shebang_range
Return the range of a shebang at the start of a file, including its line ending.
crates/ruff_linter/src/comments/shebang.rs:39
↓ 2 callers
Method
leave_level
(&mut self, saved_state: SavedLevel)
crates/ruff_python_formatter/src/range.rs:575
↓ 2 callers
Method
leave_node
(&mut self, node: AnyNodeRef<'ast>)
crates/ruff_python_formatter/src/range.rs:240
↓ 2 callers
Method
legacy_aliases
(&self)
crates/ty_python_semantic/src/types/infer.rs:392
↓ 2 callers
Method
legacy_generic_context
Returns the generic context from the first subscripted `Generic` or `Protocol` base. Returns `None` if no such base exists or the first such base int
crates/ty_python_semantic/src/types/class/static_literal.rs:459
↓ 2 callers
Function
legacy_type_alias_definition
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:64
↓ 2 callers
Function
legacy_type_alias_parameters
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:420
↓ 2 callers
Method
legacy_type_alias_reference
( &mut self, value_ty: Type<'db>, definition: Option<Definition<'db>>, referen
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:60
↓ 2 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/abstract_methods.rs:238
↓ 2 callers
Method
lex_codes
(&mut self)
crates/ruff_linter/src/noqa.rs:579
↓ 2 callers
Method
lex_decimal_number
Lex a normal number, that is, no octal, hex or binary number.
crates/ruff_python_parser/src/lexer.rs:1023
↓ 2 callers
Method
lex_directive
Collect codes in `noqa` comment.
crates/ruff_linter/src/noqa.rs:531
↓ 2 callers
Function
lex_jupyter_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1810
↓ 2 callers
Method
lex_string
Lex a string literal.
crates/ruff_python_parser/src/lexer.rs:873
↓ 2 callers
Method
lex_unicode_identifier
Continues from the cursor after the identifier's first non-ASCII character.
crates/ruff_python_parser/src/lexer.rs:684
↓ 2 callers
Function
lexical_name_path_component_for_node
Computes a lexical name path component for an enclosing scope. See [`lexical_name_path_for_definition`][] for details.
crates/ty_python_semantic/src/lexical_name_path.rs:51
↓ 2 callers
Function
lexical_name_path_for_definition
Returns the module-relative lexical name path to `definition`. For example, the path to `method` here is `["Outer", "method"]`: ```python class Outer
crates/ty_python_semantic/src/lexical_name_path.rs:17
↓ 2 callers
Method
limit_tuple_addition_result
Bound tuple alternatives produced by addition while preserving other operator results.
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:108
↓ 2 callers
Method
line_column
Returns the line and column number for an UTF-8 byte offset. The `column` number is the nth-character of the line, except for the first line where it
crates/ruff_source_file/src/line_index.rs:117
↓ 2 callers
Function
line_number
(char_index: TextSize, source: &str)
crates/mdtest/src/parser.rs:1066
↓ 2 callers
Function
line_start
(tokens: &ruff_python_ast::token::Tokens, offset: TextSize)
crates/ty_python_semantic/src/suppression/add_ignore.rs:222
↓ 2 callers
Method
line_start
Returns the [byte offset](TextSize) for the `line` with the given index.
crates/ruff_source_file/src/line_index.rs:261
↓ 2 callers
Method
line_width
(&self)
crates/ruff_formatter/src/lib.rs:268
↓ 2 callers
Method
line_width
(&self)
crates/ruff_formatter/src/format_element/document.rs:242
↓ 2 callers
Method
lineno_offset
Add an offset used for aligning the header sigil (`-->`) with the line number separators. For normal diagnostics this is computed automatically based
crates/ruff_annotate_snippets/src/snippet.rs:104
↓ 2 callers
Function
lint_documentation_url
(lint_name: LintName)
crates/ty_python_semantic/src/lint.rs:147
↓ 2 callers
Function
lint_path
Lint the source code at the given `Path`.
crates/ruff/src/diagnostics.rs:182
↓ 2 callers
Method
lint_registry
(&self)
crates/ty_test/src/db.rs:166
↓ 2 callers
Method
lint_registry
(&self)
crates/ty_python_semantic/src/db.rs:195
↓ 2 callers
Method
lint_unmerged
Lint options from one source, such as `ty.toml`, `pyproject.toml`, CLI arguments, or editor settings. When resolving project settings, lint each sour
crates/ty_project/src/metadata/options.rs:630
↓ 2 callers
Function
list_alias
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, argument: Type<'db>, )
crates/ty_python_semantic/src/types/tests.rs:287
↓ 2 callers
Function
list_root_modules
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:67
↓ 2 callers
Function
literal_fallthrough_prelude
(guarded_any: bool)
crates/ruff_benchmark/benches/ty.rs:1932
↓ 2 callers
Function
literal_match_fallthrough_code
(guarded_any: bool)
crates/ruff_benchmark/benches/ty.rs:1975
↓ 2 callers
Function
literal_sequence
Describes literal positions for both inference and diagnostics. A starred literal is expanded recursively; other starred expressions contribute the sh
crates/ty_python_semantic/src/types/unpacker.rs:620
↓ 2 callers
Function
literal_sequence_elements
( expression: &ast::Expr, promote: bool, )
crates/ty_python_semantic/src/types/unpacker.rs:642
↓ 2 callers
Function
load
Parse TOML from a binary file object.
crates/ruff_benchmark/resources/tomllib/_parser.py:57
↓ 2 callers
Function
load_reports_from_directory
Load all JSON memory reports from a directory.
scripts/memory_report.py:126
↓ 2 callers
Method
load_with_provenance
Loads an owned constraint set, replacing the provenance of every constraint.
crates/ty_python_semantic/src/types/constraints.rs:1266
← previous
next →
6,301–6,400 of 31,766, ranked by callers