Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 2 callers
Function
is_standard_library_literal
Returns `true` if a call path is `Literal`.
crates/ruff_python_stdlib/src/typing.rs:142
↓ 2 callers
Method
is_star
(self)
crates/ruff_python_parser/src/parser/statement.rs:4204
↓ 2 callers
Method
is_statement
(&self)
crates/ruff_python_semantic/src/nodes.rs:108
↓ 2 callers
Function
is_stdin
Returns true if the command should read from standard input.
crates/ruff/src/lib.rs:96
↓ 2 callers
Function
is_string
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pylint/rules/missing_maxsplit_arg.rs:78
↓ 2 callers
Method
is_string_annotation
Returns whether the given expression is a string annotation (the string in `x: "int | None"`).
crates/ty_python_semantic/src/types/infer.rs:1175
↓ 2 callers
Method
is_subclass_of
Return `true` if this symbol can be resolved to a class definition `class` in its canonical module, *and* `class` is a subclass of `other`.
crates/ty_python_semantic/src/types/class/known.rs:1504
↓ 2 callers
Method
is_subset_of
Whether every constraint in `self` has an equivalent constraint in `other`. For example, `(int, str)` is a subset of `(int, str, bytes)`, but `(bool,
crates/ty_python_semantic/src/types/typevar.rs:2157
↓ 2 callers
Function
is_supported_uri_prefix
Returns whether `uri` can grow into a supported URI scheme. The empty prefix is intentionally accepted to allow a line break directly after the targe
crates/ty_ide/src/docstring/markdown/general/inline.rs:435
↓ 2 callers
Function
is_suspicious_function_reference_enabled
https://github.com/astral-sh/ruff/pull/15541
crates/ruff_linter/src/preview.rs:35
↓ 2 callers
Method
is_symlink
(self)
crates/ruff_db/src/system.rs:342
↓ 2 callers
Function
is_sys
(expr: &Expr, target: &str, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_2020/helpers.rs:5
↓ 2 callers
Method
is_system_virtual_path
(&self)
crates/ruff_db/src/files/path.rs:51
↓ 2 callers
Method
is_t_string_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2281
↓ 2 callers
Method
is_tab
Returns `true` if this is an [`IndentStyle::Tab`].
crates/ruff_formatter/src/lib.rs:76
↓ 2 callers
Method
is_terminal
(self)
crates/ty_python_core/src/reachability_constraints.rs:105
↓ 2 callers
Method
is_test_module
Returns `true` if the module name given appears to be a test module. This routine is meant to codify a Python ecosystem convention. That is, a module
crates/ty_module_resolver/src/module_name.rs:402
↓ 2 callers
Method
is_third_party
Return `true` if this module is provided by a supported third-party package.
crates/ty_module_resolver/src/module.rs:366
↓ 2 callers
Function
is_timeout_error_alias
(qualified_name: &QualifiedName, target_version: PythonVersion)
crates/ruff_linter/src/rules/pyupgrade/rules/timeout_error_alias.rs:76
↓ 2 callers
Method
is_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:486
↓ 2 callers
Method
is_trivial_self_relation
Detect self-relations that hold for every specialization, such as `T & X ≤ T` or `T ≤ T | X`. Propagation can introduce these even though the constrai
crates/ty_python_semantic/src/types/constraints/variables.rs:525
↓ 2 callers
Function
is_trivial_statement
Return `true` if `stmt` is a "trivial statement" that has no effect nor side effect at runtime. Statements considered trivial are `pass`, `...`, and
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:1334
↓ 2 callers
Method
is_trivially_constraint_set_assignable_to
Returns whether constraint-set assignability is known to be unconditionally satisfied before constructing the relation checker.
crates/ty_python_semantic/src/types/relation.rs:682
↓ 2 callers
Function
is_tuple
Test whether the given binding can be considered a tuple. For this, we check what value might be associated with it through it's initialization, what
crates/ruff_python_semantic/src/analyze/typing.rs:1106
↓ 2 callers
Method
is_tuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:235
↓ 2 callers
Method
is_ty_extensions
(self)
crates/ty_module_resolver/src/module.rs:430
↓ 2 callers
Method
is_ty_extensions_internal
(self)
crates/ty_module_resolver/src/module.rs:434
↓ 2 callers
Function
is_type_annotation_of
Returns `true` if `expr_range` identifies a type annotation child of `parent`, i.e. the annotation of a `StmtAnnAssign` or the return annotation of a
crates/ruff_python_formatter/src/expression/parentheses.rs:42
↓ 2 callers
Method
is_type_check_only
Is a value of this type only usable in typing contexts?
crates/ty_python_semantic/src/types.rs:2840
↓ 2 callers
Method
is_type_ignore
(self)
crates/ty_python_semantic/src/suppression.rs:558
↓ 2 callers
Function
is_type_var_default_enabled
https://github.com/astral-sh/ruff/pull/20660
crates/ruff_linter/src/preview.rs:235
↓ 2 callers
Method
is_typealias
(&self)
crates/ty_python_semantic/src/types/infer/type_context.rs:104
↓ 2 callers
Method
is_typed_dict
(&self, class_def: &ast::StmtClassDef)
crates/ruff_linter/src/checkers/ast/mod.rs:3039
↓ 2 callers
Function
is_typed_dict_runtime_domain
Return whether every value in `ty` is represented by a `TypedDict` schema at runtime.
crates/ty_python_semantic/src/types/match_pattern.rs:164
↓ 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:51
↓ 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:328
↓ 2 callers
Function
is_upper_case_z_string
(expr: &Expr)
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:273
↓ 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:13
↓ 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:1114
↓ 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:638
↓ 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
Method
is_validity
(self)
crates/ty_python_semantic/src/types/infer/type_context.rs:80
↓ 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:1306
↓ 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_workspace
Returns `true` if the diagnostic mode is set to check all files in the workspace.
crates/ty_server/src/session/options.rs:461
↓ 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:2763
↓ 2 callers
Method
is_yes
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:3418
↓ 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:2826
↓ 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:1060
↓ 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:79
↓ 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:1983
↓ 2 callers
Method
iter_values
Returns an `Iterator` over the AST nodes representing the dictionary's values.
crates/ruff_python_ast/src/nodes.rs:246
↓ 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
()
crates/ty_project/src/metadata/options.rs:2026
↓ 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:7667
↓ 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:2109
↓ 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:3829
↓ 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:13038
↓ 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:1101
↓ 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:677
↓ 2 callers
Method
lazy_constraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:735
↓ 2 callers
Method
lazy_default_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, visitor: &TypeVarDefau
crates/ty_python_semantic/src/types/typevar.rs:851
↓ 2 callers
Method
leading
The text between the `{` and the expression node.
crates/ruff_python_ast/src/nodes.rs:518
↓ 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
← previous
next →
6,201–6,300 of 31,562, ranked by callers