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
is_callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:443
↓ 5 callers
Function
is_compound_statement
Return `true` if the `Stmt` is a compound statement (as opposed to a simple statement).
crates/ruff_python_ast/src/helpers.rs:21
↓ 5 callers
Method
is_definition_generic
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:364
↓ 5 callers
Method
is_deprecated
(&self)
crates/ty_python_semantic/src/lint.rs:226
↓ 5 callers
Method
is_dict_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1837
↓ 5 callers
Method
is_empty
(&self)
crates/ty_project/src/metadata/options.rs:1377
↓ 5 callers
Method
is_empty
Returns `true` if the given range is an empty comment.
crates/ruff_python_trivia/src/comment_ranges.rs:244
↓ 5 callers
Method
is_empty
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:856
↓ 5 callers
Method
is_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:260
↓ 5 callers
Function
is_enumeration
Return `true` if `class_def` is a class that has one or more enum classes in its mro
crates/ruff_python_semantic/src/analyze/class.rs:289
↓ 5 callers
Method
is_equivalence
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:860
↓ 5 callers
Method
is_file
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:103
↓ 5 callers
Function
is_file_descriptor
Returns `true` if the given expression looks like a file descriptor, i.e., if it is an integer.
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:114
↓ 5 callers
Method
is_final
Is this class final?
crates/ty_python_semantic/src/types/class/static_literal.rs:880
↓ 5 callers
Method
is_flat
(&self)
crates/ruff_formatter/src/format_element/tag.rs:192
↓ 5 callers
Method
is_frozen_dataclass
Returns the effective frozen status of this class if it's a dataclass-like class. Returns `Some(true)` for a frozen dataclass-like class, `Some(false
crates/ty_python_semantic/src/types/class/static_literal.rs:1207
↓ 5 callers
Method
is_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:370
↓ 5 callers
Method
is_generator_function
(self, index: &SemanticIndex)
crates/ty_python_core/src/scope.rs:116
↓ 5 callers
Method
is_global
(&self)
crates/ty_python_core/src/builder.rs:191
↓ 5 callers
Function
is_guarded_by_try_except
( expr: &Expr, module: &str, name: &str, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/airflow/helpers.rs:80
↓ 5 callers
Method
is_import
(&self)
crates/ty_python_core/src/definition.rs:986
↓ 5 callers
Method
is_import_from_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:999
↓ 5 callers
Method
is_include
Returns `true` if the match result is [`ModuleNameMatch::Include`].
crates/ty_module_resolver/src/module_glob.rs:212
↓ 5 callers
Method
is_invalid
Returns `true` if the parser deemed the string literal invalid.
crates/ruff_python_ast/src/nodes.rs:1837
↓ 5 callers
Method
is_lint_disabled
(&self, lint: &'static LintMetadata)
crates/ty_python_semantic/src/suppression.rs:283
↓ 5 callers
Method
is_multiline
(&self, range: TextRange)
crates/ty_ide/src/folding_range.rs:253
↓ 5 callers
Method
is_never_satisfied
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:203
↓ 5 callers
Method
is_notebook
Returns `true` if this is a notebook source file.
crates/ruff_db/src/source.rs:107
↓ 5 callers
Method
is_parameter_section
(self)
crates/ty_ide/src/docstring/document.rs:156
↓ 5 callers
Method
is_pure_redundant_with
Return `true` if `self` is redundant with `other` under the pure redundancy relation. Unlike [`Self::is_redundant_with`], this does not apply shortcu
crates/ty_python_semantic/src/types/relation.rs:849
↓ 5 callers
Function
is_reachable
( db: &'db dyn Db, use_def: &UseDefMap<'db>, reachability: ScopedReachabilityConstraintId, )
crates/ty_python_semantic/src/reachability.rs:2131
↓ 5 callers
Function
is_same_expression
Returns `true` if the given argument is the "same" as the given expression. For example, if the argument has a default, it is not considered the same
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:467
↓ 5 callers
Method
is_singleton
Return `true` when this complement represents exactly one enum literal. Complements with rest components are not singletons, because those positive i
crates/ty_python_semantic/src/types/enums.rs:779
↓ 5 callers
Method
is_stub
(self)
crates/ruff_python_ast/src/lib.rs:145
↓ 5 callers
Function
is_sys_version_block
Returns `true` if the [`ast::StmtIf`] is a version-checking block (e.g., `if sys.version_info >= ...:`).
crates/ruff_python_semantic/src/analyze/typing.rs:456
↓ 5 callers
Method
is_unbound
Return `true` if this [`Binding`] represents an unbound variable (e.g., `x` in `x = 1; del x`).
crates/ruff_python_semantic/src/binding.rs:118
↓ 5 callers
Method
is_uninhabited
(self)
crates/ty_python_core/src/lib.rs:997
↓ 5 callers
Method
is_unparenthesized_starred_expr
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3045
↓ 5 callers
Function
is_valid_default_value_with_annotation
( default: &Expr, allow_container: bool, locator: &Locator, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:293
↓ 5 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:465
↓ 5 callers
Method
is_yes
Returns `true` if the parenthesized value is `Yes`.
crates/ruff_python_parser/src/parser/mod.rs:1156
↓ 5 callers
Method
is_yes
(self)
crates/ty_python_semantic/src/types/constraints.rs:3745
↓ 5 callers
Method
iter
(&self)
crates/ruff_python_ast/src/comparable.rs:388
↓ 5 callers
Method
iter
Returns an iterator over the starting rows of each cell (1-based). This yields one entry per Python cell (skipping over Markdown cell).
crates/ruff_notebook/src/index.rs:43
↓ 5 callers
Method
iter
(&self)
crates/ty_ide/src/hover.rs:353
↓ 5 callers
Method
iter
(&self)
crates/ruff_linter/src/linter.rs:77
↓ 5 callers
Method
iter_callable_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1065
↓ 5 callers
Method
iter_constructor_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1082
↓ 5 callers
Function
iter_parent_enum_classes
Iterates over parent enum classes in the MRO, skipping known enum infrastructure classes but including `IntEnum`, `Flag`, and `IntFlag` which declare
crates/ty_python_semantic/src/types/enums.rs:1376
↓ 5 callers
Method
kind
(&self)
crates/ruff_python_parser/src/typing.rs:26
↓ 5 callers
Method
kind
Returns the section kind.
crates/ty_ide/src/docstring/document.rs:68
↓ 5 callers
Method
len
The number of characters this line ending occupies in bytes.
crates/ruff_annotate_snippets/src/renderer/source_map.rs:714
↓ 5 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:3731
↓ 5 callers
Method
line_start
(&self, offset: TextSize)
crates/ruff_source_file/src/line_ranges.rs:339
↓ 5 callers
Method
line_str
Returns the text of the `offset`'s line. See [`LineRanges::line_str`].
crates/ruff_linter/src/locator.rs:132
↓ 5 callers
Method
lint_registry
(&self)
crates/ty_project/src/db.rs:627
↓ 5 callers
Method
linter_version
Return the [`PythonVersion`] to use for version-dependent lint rules. This will either be the Python version specified by the user or the default Pyt
crates/ruff_linter/src/settings/mod.rs:916
↓ 5 callers
Method
literal_fallback_instance
Returns the fallback instance type that a literal is an instance of, or `None` if the type is not a literal.
crates/ty_python_semantic/src/types.rs:3702
↓ 5 callers
Method
map
(self, operation: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types/recursive.rs:753
↓ 5 callers
Method
map
(self, db: &'db dyn Db, mut f: impl FnMut(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/method.rs:86
↓ 5 callers
Method
map
(self, mut f: impl FnMut(CallableType<'db>) -> CallableType<'db>)
crates/ty_python_semantic/src/types/callable.rs:1159
↓ 5 callers
Method
map_type
Transform the member's value type without changing its property accessor deprecations.
crates/ty_python_semantic/src/types.rs:1159
↓ 5 callers
Method
map_with_boundness_and_qualifiers
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut transform_fn: impl
crates/ty_python_semantic/src/types/typevar.rs:2372
↓ 5 callers
Function
mapping_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:80
↓ 5 callers
Function
match_call
Match that the given expression is `func(x, y, z, ...)`.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:377
↓ 5 callers
Method
matched_subject_type
Return the type established when `pattern` matches `subject_ty`. This analysis is independent of binding inference. In particular, every `or`-pattern
crates/ty_python_semantic/src/types/narrow.rs:2329
↓ 5 callers
Function
max_parallelism
()
crates/ruff_db/src/lib.rs:105
↓ 5 callers
Method
maximum
Returns the maximum length of this tuple, if any.
crates/ty_python_semantic/src/types/tuple.rs:73
↓ 5 callers
Method
may_match
Returns whether `source` may contain the configured identifier or keyword. The literal search checks for boundaries at bytes other than ASCII letters
crates/ruff_python_trivia/src/name_matcher.rs:50
↓ 5 callers
Method
may_share_type_identity
Returns `false` if `self` and `other` cannot have the same [`TypeIdentity`]. A `true` result is only a candidate match and must be confirmed with [`T
crates/ty_python_semantic/src/types/cyclic.rs:66
↓ 5 callers
Method
merge
(self, other: Self)
crates/ruff_python_ast/src/helpers.rs:65
↓ 5 callers
Method
merge
(&self, types: &[Type<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:59
↓ 5 callers
Method
message
(&self)
crates/ty_ide/src/hints.rs:17
↓ 5 callers
Function
method
Check a method for unused arguments.
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:320
↓ 5 callers
Method
missing_node_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:343
↓ 5 callers
Function
module_for_mode
(db: &'db TestDb, name: &str, mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:3564
↓ 5 callers
Method
most_flat
Returns the least expanded variant # Panics When the number of variants is less than two.
crates/ruff_formatter/src/format_element.rs:376
↓ 5 callers
Method
mro_no_object_fallback
Exclude attributes defined on `object` when looking up attributes.
crates/ty_python_semantic/src/types.rs:1412
↓ 5 callers
Method
name
Name of the parameter (if it has one).
crates/ty_python_semantic/src/types/signatures.rs:6358
↓ 5 callers
Method
name
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:570
↓ 5 callers
Method
narrow
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, base_type: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:5767
↓ 5 callers
Function
nearest_enclosing_function
Returns the type of the nearest enclosing function for the given scope. This function walks up the ancestor scopes starting from the given scope, and
crates/ty_python_semantic/src/types/infer.rs:967
↓ 5 callers
Method
next
(self, end_position: TextSize)
crates/ruff_python_formatter/src/builders.rs:109
↓ 5 callers
Method
next
Move to the next parameter in both the `source` and `target` parameter iterators, [`None`] if both iterators are exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3157
↓ 5 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:430
↓ 5 callers
Method
nominal_origin_instance
Returns the nominal instance of a protocol's origin without asserting nominal subtyping.
crates/ty_python_semantic/src/types/instance.rs:1796
↓ 5 callers
Method
notebook_document
Returns the LSP [`NotebookDocument`] corresponding to `File` or `None` if the file isn't open in the editor or if it isn't a notebook.
crates/ty_server/src/db.rs:16
↓ 5 callers
Method
notebook_index
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:785
↓ 5 callers
Function
notebook_path
Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory.
crates/ruff_notebook/src/notebook.rs:521
↓ 5 callers
Method
offset
(&self)
crates/ruff_python_parser/src/lexer.rs:1390
↓ 5 callers
Method
open
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:226
↓ 5 callers
Function
optional_parentheses
Wraps an expression in parentheses only if it still does not fit after expanding all expressions that start or end with a parentheses (`()`, `[]`, `{}
crates/ruff_python_formatter/src/expression/parentheses.rs:201
↓ 5 callers
Method
ordering
Defines the ordering of the variables in a constraint set BDD. If we only care about _correctness_, we can choose any ordering that we want, as long
crates/ty_python_semantic/src/types/constraints.rs:2137
↓ 5 callers
Method
overlaps_with
Returns whether this support contains any type variables in common with `other`.
crates/ty_python_semantic/src/types/constraints/support.rs:108
↓ 5 callers
Method
own_instance_member
A helper function for `instance_member` that looks up the `name` attribute only on this class, not on its superclasses.
crates/ty_python_semantic/src/types/class.rs:2277
↓ 5 callers
Method
own_tuple_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types/instance.rs:382
↓ 5 callers
Function
pad_end
Like [`pad_expression`], but only pads the end of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:375
↓ 5 callers
Method
parameter_definition
(&'db self, parameter_name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4437
↓ 5 callers
Method
parameter_types
Returns the bound types for each parameter, in parameter source order, or `None` if no argument was matched to that parameter.
crates/ty_python_semantic/src/types/call/bind.rs:9621
↓ 5 callers
Method
parameters
The identities of this definition's formal parameters, in declaration order.
crates/ty_python_semantic/src/types/cyclic.rs:340
← previous
next →
2,801–2,900 of 31,766, ranked by callers