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
↓ 6 callers
Method
into_diagnostic_message
(self)
crates/ruff_db/src/diagnostic/mod.rs:1635
↓ 6 callers
Method
into_edit
(self)
crates/ruff_linter/src/noqa.rs:1083
↓ 6 callers
Method
is_alias
Return `true` if this [`Binding`] represents an aliased symbol (e.g., `app` in `from fastapi import FastAPI as app`).
crates/ruff_python_semantic/src/binding.rs:76
↓ 6 callers
Method
is_always_raise
Returns `true` if the [`Terminal`] behavior is `Raise` or `RaiseNotImplemented`.
crates/ruff_python_semantic/src/analyze/terminal.rs:44
↓ 6 callers
Method
is_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2540
↓ 6 callers
Function
is_cased_lowercase
Return `true` if a string is _cased_ as lowercase. A string is cased as lowercase if it contains at least one lowercase character and no uppercase ch
crates/ruff_python_stdlib/src/str.rs:96
↓ 6 callers
Method
is_closed
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:126
↓ 6 callers
Function
is_const_false
Return `true` if an [`Expr`] is a literal `False`.
crates/ruff_python_ast/src/helpers.rs:846
↓ 6 callers
Method
is_dataclass_like
Returns `true` if this class is a dataclass-like class. This covers `@dataclass`-decorated classes, as well as classes created via `dataclass_transfo
crates/ty_python_semantic/src/types/class/static_literal.rs:259
↓ 6 callers
Method
is_empty
(&self)
crates/ty_project/src/files.rs:207
↓ 6 callers
Method
is_empty
Whether there are no modules or stub override names to visit during recursive enumeration.
crates/ty_module_resolver/src/resolve/search.rs:458
↓ 6 callers
Method
is_empty
(&self)
crates/ruff_python_parser/tests/generate_inline_tests.rs:46
↓ 6 callers
Method
is_enabled
(self)
crates/ruff_python_formatter/src/options.rs:362
↓ 6 callers
Method
is_f_string_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2244
↓ 6 callers
Method
is_first_party
Is this search path in "first party" code? i.e., The end user's project code.
crates/ty_module_resolver/src/path.rs:717
↓ 6 callers
Method
is_fluent
(self)
crates/ruff_python_formatter/src/expression/mod.rs:1137
↓ 6 callers
Method
is_fully_static
Checks whether the visited type contents contain no dynamic types. This is not a complete test for semantic staticness: the visitor skips original fu
crates/ty_python_semantic/src/types.rs:2544
↓ 6 callers
Method
is_gradual
Returns whether the parameter list contains a gradual variadic pair.
crates/ty_python_semantic/src/types/signatures.rs:5233
↓ 6 callers
Function
is_immutable_annotation
Return `true` if `Expr` represents a reference to a type annotation that resolves to an immutable type.
crates/ruff_python_semantic/src/analyze/typing.rs:293
↓ 6 callers
Function
is_import_required_by_isort
( required_imports: &RequiredImports, stmt: StmtRef, alias: &Alias, )
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_future_import.rs:85
↓ 6 callers
Method
is_interpolated_string
Does the string have an `f`,`F`,`t`, or `T` prefix?
crates/ruff_python_ast/src/nodes.rs:2505
↓ 6 callers
Method
is_intersection
Returns true if this element is an intersection of multiple callables.
crates/ty_python_semantic/src/types/call/bind.rs:518
↓ 6 callers
Function
is_keyword
See: https://github.com/python/cpython/blob/9d692841691590c25e6cf5b2250a594d3bf54825/Lib/keyword.py#L18
crates/ruff_python_stdlib/src/keyword.rs:2
↓ 6 callers
Method
is_method_like
Returns `true` if this callable represents a function used as a class member.
crates/ty_python_semantic/src/types/callable.rs:907
↓ 6 callers
Method
is_not
( self, because: impl std::fmt::Display, error_context: ErrorC
crates/ty_python_semantic/src/types/iteration.rs:801
↓ 6 callers
Method
is_notimplemented
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:2741
↓ 6 callers
Method
is_package
(self)
crates/ty_module_resolver/src/module.rs:221
↓ 6 callers
Method
is_promotable
(self)
crates/ty_python_semantic/src/types/literal.rs:55
↓ 6 callers
Method
is_raw_string
(&self)
crates/ruff_linter/src/docstrings/mod.rs:53
↓ 6 callers
Method
is_removed
(&self)
crates/ty_python_semantic/src/lint.rs:222
↓ 6 callers
Function
is_set
Test whether the given binding can be considered a set. For this, we check what value might be associated with it through it's initialization and wha
crates/ruff_python_semantic/src/analyze/typing.rs:1097
↓ 6 callers
Method
is_start
Returns `true` if `self` is any start tag.
crates/ruff_formatter/src/format_element/tag.rs:103
↓ 6 callers
Method
is_terminal
(self)
crates/ty_python_core/src/narrowing_constraints.rs:58
↓ 6 callers
Method
is_third_party
(self)
crates/ty_python_semantic/src/types/class/known.rs:2250
↓ 6 callers
Method
iter
Return an iterator over live declarations for this place.
crates/ty_python_core/src/use_def/place_state.rs:263
↓ 6 callers
Method
iter_callable_items
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1061
↓ 6 callers
Method
iter_evidence_without_validity
( &self, source: EvidenceSource, )
crates/ty_python_semantic/src/types/constraints.rs:1903
↓ 6 callers
Method
key
(&self)
crates/ruff_python_ast/src/nodes.rs:232
↓ 6 callers
Method
key
Uses the conservative control-flow revision when the reachability arena is saturated.
crates/ty_python_core/src/use_def/exception_checkpoint.rs:77
↓ 6 callers
Function
keyword
()
crates/ruff_python_parser/resources/invalid/statements/function_type_parameters.py:11
↓ 6 callers
Method
kind
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5119
↓ 6 callers
Method
label
(&self)
crates/ty_ide/src/completion.rs:394
↓ 6 callers
Function
leading_space
Leading space.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D.py:135
↓ 6 callers
Method
len
(&self)
crates/ty_module_resolver/src/typeshed.rs:314
↓ 6 callers
Method
len
(&self)
crates/ty_python_core/src/member.rs:704
↓ 6 callers
Method
len
Return the type of `len()` on a type if it is known more precisely than `int`, or `None` otherwise. In the second case, the return type of `len()` in
crates/ty_python_semantic/src/types.rs:6955
↓ 6 callers
Method
len
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:109
↓ 6 callers
Function
lex
(source: &str, mode: Mode)
crates/ruff_python_parser/src/lexer.rs:1559
↓ 6 callers
Method
line_ending
(&self)
crates/ruff_python_codegen/src/stylist.rs:27
↓ 6 callers
Function
lint_toml
( path: &Path, contents: &str, settings: &LinterSettings, source_type: TomlSourceType, )
crates/ruff_linter/src/toml.rs:26
↓ 6 callers
Method
list_modules
Lists the modules immediately available at the cursor's current position. In order to prevent cycles that might occur during recursive enumeration (i
crates/ty_module_resolver/src/resolve/search.rs:215
↓ 6 callers
Method
mark_used
(&mut self)
crates/ty_python_core/src/symbol.rs:155
↓ 6 callers
Method
mark_verbatim_node_comments_formatted
(&self, _node: AnyNodeRef)
crates/ruff_python_formatter/src/comments/mod.rs:405
↓ 6 callers
Method
match_maybe_stringized_annotation
Apply a test to an annotation expression, abstracting over the fact that the annotation expression might be "stringized". A stringized annotation is
crates/ruff_linter/src/checkers/ast/mod.rs:614
↓ 6 callers
Method
matched_type
The type supplied to a matched parameter. Splats supply their matched element type, while ordinary arguments may be inferred using the parameter's typ
crates/ty_python_semantic/src/types/call/arguments.rs:133
↓ 6 callers
Method
materialization
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, materialization_kind:
crates/ty_python_semantic/src/types.rs:2953
↓ 6 callers
Method
materialize_builtin_binding
Creates and returns a concrete binding for an unmaterialized builtin.
crates/ruff_python_semantic/src/model.rs:316
↓ 6 callers
Function
may_exist_at_runtime
(db: &'db dyn Db, definition: Definition<'db>)
crates/ty_python_semantic/src/types.rs:303
↓ 6 callers
Function
maybe_parenthesize_expression
Wraps an expression in optional parentheses except if its [`NeedsParentheses::needs_parentheses`] implementation indicates that it is okay to omit the
crates/ruff_python_formatter/src/expression/mod.rs:324
↓ 6 callers
Method
member_count
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/equality/enums.rs:551
↓ 6 callers
Method
member_names
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:374
↓ 6 callers
Method
merge
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/typevar.rs:2168
↓ 6 callers
Method
merged_specialization_with
Project the merged inference result into a specialization with explicit handling for each type variable. Alternatives are merged before applying defau
crates/ty_python_semantic/src/types/generics.rs:2650
↓ 6 callers
Method
metadata
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:70
↓ 6 callers
Method
module_name
(&self)
crates/ruff_linter/src/rules/isort/types.rs:65
↓ 6 callers
Method
name
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2125
↓ 6 callers
Method
name
(self)
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:126
↓ 6 callers
Method
next
(&mut self)
crates/ruff_source_file/src/newlines.rs:80
↓ 6 callers
Method
next
(&mut self)
crates/ty_python_core/src/lib.rs:905
↓ 6 callers
Method
next
(&mut self)
crates/ty_ide/src/docstring/document/syntax.rs:116
↓ 6 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:241
↓ 6 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_coding_comment.rs:150
↓ 6 callers
Method
next_token
Lex the next token.
crates/ruff_python_parser/src/lexer.rs:144
↓ 6 callers
Method
normalize
Computes the strings preferred quotes and normalizes its content.
crates/ruff_python_formatter/src/string/normalize.rs:237
↓ 6 callers
Function
normalize_whitespace
(s: &str)
crates/ruff_annotate_snippets/src/renderer/render.rs:2618
↓ 6 callers
Method
open_files
Returns the open files in the project.
crates/ty_project/src/lib.rs:666
↓ 6 callers
Method
open_text_document_with_language_id
Send a `textDocument/didOpen` notification with the specified language id.
crates/ruff_server/tests/e2e/main.rs:700
↓ 6 callers
Method
p_id
(&mut self, s: &Identifier)
crates/ruff_python_codegen/src/generator.rs:181
↓ 6 callers
Function
pad_start
Like [`pad_expression`], but only pads the start of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:354
↓ 6 callers
Method
parse
Parse the `pyvenv.cfg` file and return the parsed data.
crates/ty_site_packages/src/lib.rs:1112
↓ 6 callers
Method
parse_binary_expression_or_higher
Parses a binary expression using the [Pratt parsing algorithm]. [Pratt parsing algorithm]: https://matklad.github.io/2020/04/13/simple-but-powerful-p
crates/ruff_python_parser/src/parser/expression.rs:245
↓ 6 callers
Method
path
(&self, file: File)
crates/ruff_db/src/diagnostic/render.rs:774
↓ 6 callers
Function
place_by_id
( db: &'db dyn Db, scope: ScopeId<'db>, place_id: ScopedPlaceId, requires_explicit_reexport: R
crates/ty_python_semantic/src/place.rs:1292
↓ 6 callers
Method
position
(&self)
crates/ruff_python_parser/src/string.rs:121
↓ 6 callers
Function
prepare
Sends a `textDocument/prepareTypeHierarchy` request.
crates/ty_server/tests/e2e/type_hierarchy.rs:161
↓ 6 callers
Method
primary
Create a "primary" annotation. A primary annotation is meant to highlight the "locus" of a diagnostic. That is, it should point to something in the e
crates/ruff_db/src/diagnostic/mod.rs:790
↓ 6 callers
Method
primary_annotation_mut
Returns a mutable borrow of the "primary" annotation of this diagnostic if one exists. When there are multiple primary annotations, then the first on
crates/ruff_db/src/diagnostic/mod.rs:311
↓ 6 callers
Method
program
(&self)
crates/ty_python_semantic/src/semantic_model.rs:82
↓ 6 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/constraints/resolution.rs:166
↓ 6 callers
Method
project_db_mut
Returns a mutable reference to the project's [`ProjectDatabase`] in which the given `path` belongs. Refer to [`project_db`] for more details on how t
crates/ty_server/src/session.rs:487
↓ 6 callers
Method
projects
(&self)
crates/ty_server/src/session.rs:1696
↓ 6 callers
Method
ptr_eq
Compares two any node refs by their pointers (referential equality).
crates/ruff_python_ast/src/node.rs:575
↓ 6 callers
Function
py38_typeshed_test_case
(typeshed: MockedTypeshed)
crates/ty_module_resolver/src/path.rs:1263
↓ 6 callers
Method
py_index
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, index: i32, )
crates/ty_python_semantic/src/types/tuple.rs:1094
↓ 6 callers
Function
pytest_cursor_test
(source: &str)
crates/ty_ide/src/find_references.rs:3438
↓ 6 callers
Method
python_version
(&self)
crates/ruff_python_parser/tests/fixtures.rs:636
↓ 6 callers
Method
qualifiers
(&self)
crates/ty_python_semantic/src/place.rs:901
↓ 6 callers
Method
quote_str
A `str` representation of the quotes used to start and close. This does not include any prefixes the string has in its opener.
crates/ruff_python_ast/src/nodes.rs:1004
↓ 6 callers
Method
range
Returns the range of the unpack target expression.
crates/ty_python_core/src/unpack.rs:84
↓ 6 callers
Method
range
(&self)
crates/ty_ide/src/symbols.rs:681
← previous
next →
2,401–2,500 of 31,766, ranked by callers