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
↓ 4 callers
Function
is_class_object_type
(ty: Type<'_>)
crates/ty_python_semantic/src/types/protocol_class.rs:2553
↓ 4 callers
Method
is_classmethod
Returns true if this overload is decorated with `@classmethod`, or if it is implicitly a classmethod.
crates/ty_python_semantic/src/types/function.rs:370
↓ 4 callers
Method
is_classmethod
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:47
↓ 4 callers
Method
is_compare_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2170
↓ 4 callers
Method
is_constrained
Returns whether this type variable has constraints without evaluating a lazy bound.
crates/ty_python_semantic/src/types/typevar.rs:363
↓ 4 callers
Method
is_declared
(self)
crates/ty_python_core/src/place.rs:125
↓ 4 callers
Method
is_definitely_defined
(&self)
crates/ty_python_semantic/src/place.rs:195
↓ 4 callers
Method
is_definitely_non_data_descriptor
Returns whether this type is known not to be a data descriptor. Descriptor uncertainty propagates through outer unions, intersections, and aliases. `
crates/ty_python_semantic/src/types.rs:5566
↓ 4 callers
Function
is_discarded_dict_key_assignment
Returns `true` if the definition refers to a dictionary-key binding that should be discarded. For example, inference synthesizes an `x["a"] = "bad"`
crates/ty_python_semantic/src/types/infer.rs:296
↓ 4 callers
Method
is_dynamic
(&self)
crates/ty_python_semantic/src/types.rs:2800
↓ 4 callers
Method
is_eager_assignability
(&self)
crates/ty_python_semantic/src/types/relation.rs:1427
↓ 4 callers
Method
is_empty
(&self)
crates/ty_project/src/metadata/options.rs:1281
↓ 4 callers
Method
is_empty
(&self)
crates/ty_ide/src/will_rename.rs:214
↓ 4 callers
Function
is_empty_f_string
Returns `true` if the expression definitely resolves to the empty string, when used as an f-string expression.
crates/ruff_python_ast/src/helpers.rs:1609
↓ 4 callers
Method
is_equivalent_to_materialization
( &self, db: &'db dyn Db, left: Type<'db>, right: Type<'db>, )
crates/ty_python_semantic/src/types.rs:668
↓ 4 callers
Method
is_fixable
(self, diagnostic: &Diagnostic)
crates/ty_python_semantic/src/fixes.rs:365
↓ 4 callers
Method
is_generic_alias
(&self)
crates/ty_python_semantic/src/types.rs:2759
↓ 4 callers
Method
is_gradual
Returns `true` if the parameters represent a gradual form using `...` as the only parameter or a `Concatenate` form with `...` as the last argument.
crates/ty_python_semantic/src/types/signatures.rs:5353
↓ 4 callers
Function
is_init
Returns `true` if a function is an `__init__`.
crates/ruff_python_semantic/src/analyze/visibility.rs:127
↓ 4 callers
Method
is_int
(self)
crates/ty_python_semantic/src/types/literal.rs:229
↓ 4 callers
Method
is_invalid_syntax
Returns `true` if `self` is a syntax error message.
crates/ruff_db/src/diagnostic/mod.rs:475
↓ 4 callers
Method
is_keyword_only
Returns `true` if this is a keyword-only parameter.
crates/ty_python_semantic/src/types/signatures.rs:6359
↓ 4 callers
Method
is_kw_only_sentinel
Returns true if this field is a `dataclasses.KW_ONLY` sentinel. <https://docs.python.org/3/library/dataclasses.html#dataclasses.KW_ONLY>
crates/ty_python_semantic/src/types/class.rs:2819
↓ 4 callers
Method
is_last_top_level_statement
Returns `true` if this is the last top-level statement in the module.
crates/ruff_python_formatter/src/context.rs:244
↓ 4 callers
Method
is_lazy
Returns `true` if the import laziness is [`Self::Lazy`].
crates/ruff_python_semantic/src/model.rs:2547
↓ 4 callers
Method
is_lint
(self)
crates/ty_python_semantic/src/suppression.rs:601
↓ 4 callers
Method
is_lint_named
Returns `true` if this `DiagnosticId` represents a lint with the given name.
crates/ruff_db/src/diagnostic/mod.rs:1118
↓ 4 callers
Method
is_list_element
(self, p: &Parser)
crates/ruff_python_parser/src/parser/mod.rs:1472
↓ 4 callers
Function
is_lowercase
Return `true` if a string is lowercase. A string is lowercase if all alphabetic characters in the string are lowercase. ## Examples ```rust use ruf
crates/ruff_python_stdlib/src/str.rs:21
↓ 4 callers
Method
is_match
(&self, name: &str)
crates/ty_ide/src/completion.rs:1624
↓ 4 callers
Method
is_match_symbol_name
(&self, symbol_name: &str)
crates/ty_ide/src/symbols.rs:75
↓ 4 callers
Function
is_model
Returns whether `class` is a subclass of Django's `Model`.
crates/ty_python_semantic/src/types/dedicated/django.rs:20
↓ 4 callers
Method
is_module
(self)
crates/ty_python_core/src/scope.rs:269
↓ 4 callers
Method
is_named_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1652
↓ 4 callers
Method
is_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:137
↓ 4 callers
Function
is_non_exported
( db: &'db dyn Db, declaration: Definition<'db>, requires_explicit_reexport: RequiresExplicitReExp
crates/ty_python_semantic/src/place.rs:2371
↓ 4 callers
Function
is_non_logical_token
Returns `true` if the given `token` is a non-logical token. Unlike [`TokenKind::is_trivia`], this function also considers the indent, dedent and newl
crates/ruff_linter/src/rules/pycodestyle/helpers.rs:12
↓ 4 callers
Method
is_notebook
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:768
↓ 4 callers
Function
is_or_contains_typeddict
Return true if the given type is a `TypedDict` or a union or intersection that includes at least one `TypedDict` (even if other types are also present
crates/ty_python_semantic/src/types/narrow.rs:5526
↓ 4 callers
Method
is_primary
(&self)
crates/ruff_annotate_snippets/src/renderer/render.rs:2493
↓ 4 callers
Function
is_printable
According to python following categories aren't printable: Cc (Other, Control) Cf (Other, Format) Cs (Other, Surrogate) Co (Other, Private Use) Cn (Ot
crates/ruff_python_literal/src/char.rs:12
↓ 4 callers
Method
is_private_declaration
Return `true` if this [`Binding`] represents an private declaration (e.g., `_x` in `_x = "private variable"`)
crates/ruff_python_semantic/src/binding.rs:127
↓ 4 callers
Method
is_property_instance
(&self)
crates/ty_python_semantic/src/types.rs:3251
↓ 4 callers
Method
is_pydantic
(self)
crates/ty_python_semantic/src/types/class.rs:334
↓ 4 callers
Function
is_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code, considering both scope reachability and statement-level reachability within the sc
crates/ty_python_semantic/src/reachability.rs:2107
↓ 4 callers
Method
is_raw_string
Does the string have an `r` or `R` prefix?
crates/ruff_python_ast/src/nodes.rs:2485
↓ 4 callers
Method
is_raw_string
Returns `true` if the current f-string is a raw f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:70
↓ 4 callers
Function
is_reachable_implementation_definition
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/ide_support.rs:809
↓ 4 callers
Method
is_reassigned
(&self)
crates/ty_python_core/src/symbol.rs:127
↓ 4 callers
Method
is_recursive_divergent
(&self)
crates/ty_python_semantic/src/types.rs:2480
↓ 4 callers
Method
is_return_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:444
↓ 4 callers
Method
is_root
(&self)
crates/ruff_workspace/src/resolver.rs:802
↓ 4 callers
Method
is_soft_keyword
(self)
crates/ruff_python_ast/src/token.rs:370
↓ 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:5383
↓ 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:2153
↓ 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:1266
↓ 4 callers
Method
is_subtyping
(self)
crates/ty_python_semantic/src/types/relation.rs:179
↓ 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:222
↓ 4 callers
Method
is_type_expression_explanation
(&self)
crates/ty_python_semantic/src/types/context.rs:296
↓ 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:2733
↓ 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:1587
↓ 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:523
↓ 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:425
↓ 4 callers
Method
is_valid
(&self)
crates/ty_python_semantic/src/types/constraints.rs:4890
↓ 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:1963
↓ 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:590
↓ 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:382
↓ 4 callers
Method
keywords
Return an iterator over the metaclass keywords of the class.
crates/ruff_python_ast/src/nodes.rs:41
↓ 4 callers
Method
known
Is this a module that we special-case somehow? If so, which one?
crates/ty_module_resolver/src/module.rs:88
↓ 4 callers
Function
known_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2244
↓ 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
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
↓ 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:876
↓ 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:1722
↓ 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:3449
↓ 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
← previous
next →
3,301–3,400 of 31,562, ranked by callers