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
↓ 5 callers
Method
format
(&self)
crates/ruff_python_formatter/src/pattern/mod.rs:97
↓ 5 callers
Method
format
(&self)
crates/ruff_python_formatter/src/other/identifier.rs:19
↓ 5 callers
Function
format_enumeration
Format a list of elements as a human-readable enumeration. Encloses every element in backticks (`1`, `2` and `3`).
crates/ty_python_semantic/src/diagnostic/mod.rs:150
↓ 5 callers
Function
format_module_ast
( parsed: &'a Parsed<Mod>, trivia: &'a TriviaRanges, source: &'a str, options: PyFormatOptions
crates/ruff_python_formatter/src/lib.rs:153
↓ 5 callers
Function
format_range
( document: &TextDocument, source_type: SourceType, formatter_settings: &FormatterSettings, ra
crates/ruff_server/src/format.rs:130
↓ 5 callers
Method
full_search_candidates
Returns module candidates for the full search, initializing the candidates on first access if needed.
crates/ty_module_resolver/src/resolve/search.rs:881
↓ 5 callers
Function
gen
()
crates/ruff_linter/resources/test/fixtures/syntax_errors/return_in_generator.py:1
↓ 5 callers
Function
generate_import_edit
Return the [`Fix`] that imports the new name and updates where the import is referenced. This is used for cases that member name has changed. (e.g., `
crates/ruff_linter/src/rules/airflow/helpers.rs:218
↓ 5 callers
Function
generate_remove_and_runtime_import_edit
Return the [`Fix`] that remove the original import and import the same name with new path. This is used for cases that member name has not changed. (e
crates/ruff_linter/src/rules/airflow/helpers.rs:240
↓ 5 callers
Method
generator_types
Extract the yield, send, and return types of a generator.
crates/ty_python_semantic/src/types.rs:8797
↓ 5 callers
Method
generic_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:289
↓ 5 callers
Method
get_argument_index
(&self, argument_index: usize)
crates/ty_python_semantic/src/types/call/bind.rs:5138
↓ 5 callers
Method
get_by_index
Returns a reference to the AST node at the given index.
crates/ruff_db/src/parsed.rs:231
↓ 5 callers
Function
get_cargo_workspace_root
()
crates/ty_python_semantic/tests/corpus.rs:20
↓ 5 callers
Function
get_cwd
Return the current working directory. On WASM this just returns `.`. Otherwise, defer to [`path_absolutize::path_dedot::CWD`].
crates/ruff_linter/src/fs.rs:11
↓ 5 callers
Method
get_interior_node
(&self, id: ScopedNarrowingConstraint)
crates/ty_python_core/src/narrowing_constraints.rs:117
↓ 5 callers
Function
has_leading_content
Return `true` if the node starting the given [`TextSize`] has leading content.
crates/ruff_python_trivia/src/whitespace.rs:60
↓ 5 callers
Function
has_parentheses
Returns the [`OwnParentheses`] value for a given [`Expr`], to indicate whether it has its own parentheses or is itself parenthesized. Differs from [`
crates/ruff_python_formatter/src/expression/mod.rs:1162
↓ 5 callers
Method
has_separate_implementation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:971
↓ 5 callers
Method
id
(&self)
crates/ruff_python_ast/src/nodes.rs:2705
↓ 5 callers
Method
identity_comparison_truthiness
Return whether values of these types always, never, or possibly identify the same object.
crates/ty_python_semantic/src/types/infer/comparisons.rs:553
↓ 5 callers
Function
if_group_breaks
(content: &Content)
crates/ruff_formatter/src/builders.rs:1871
↓ 5 callers
Function
imp
( db: &'db dyn Db, ty: Type<'db>, visitor: &CompletionKindVisitor<'db>, )
crates/ty_ide/src/completion.rs:3309
↓ 5 callers
Method
in_annotation
Return `true` if the model is in a type annotation.
crates/ruff_python_semantic/src/model.rs:2090
↓ 5 callers
Method
in_dunder_all_definition
Return `true` if the model is visiting the r.h.s. of an `__all__` definition (e.g. `"foo"` in `__all__ = ["foo"]`)
crates/ruff_python_semantic/src/model.rs:2319
↓ 5 callers
Method
in_module_scope
(&self)
crates/ruff_python_parser/tests/fixtures.rs:688
↓ 5 callers
Method
in_type_checking_block
Return `true` if the model is in a type-checking block.
crates/ruff_python_semantic/src/model.rs:2266
↓ 5 callers
Method
indent_style
(&self)
crates/ruff_formatter/src/printer/printer_options/mod.rs:51
↓ 5 callers
Method
indent_width
(&self)
crates/ruff_python_formatter/src/options.rs:240
↓ 5 callers
Method
index
(&self)
crates/ruff_server/src/edit/text_document.rs:72
↓ 5 callers
Method
index
(&self, index: InternedBindingsId)
crates/ty_python_core/src/use_def.rs:541
↓ 5 callers
Method
index_mut
Returns a mutable reference to the index. This method drops all references to the index and returns a guard that will restore the references when dro
crates/ty_server/src/session.rs:1456
↓ 5 callers
Method
infer_and_check_argument_types
( &mut self, ast_arguments: ArgumentsIter<'_>, argument_types: &'args mut CallArgument
crates/ty_python_semantic/src/types/infer/builder.rs:5971
↓ 5 callers
Method
infer_annotation_expression
Infer the type of an annotation expression with the given [`DeferredExpressionState`].
crates/ty_python_semantic/src/types/infer/builder/annotation_expression.rs:52
↓ 5 callers
Method
infer_explicit_callable_specialization
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, generic_cont
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:605
↓ 5 callers
Method
infer_region
Infers types in the given [`InferenceRegion`].
crates/ty_python_semantic/src/types/infer/builder.rs:1164
↓ 5 callers
Method
infer_target
Infer the (definition) types involved in a `target` expression. This is used for assignment statements, for statements, etc. with a single or multipl
crates/ty_python_semantic/src/types/infer/builder.rs:3110
↓ 5 callers
Method
infer_type_expression_reference
Resolve a type-expression reference once, retaining its source definition.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:272
↓ 5 callers
Method
infer_type_expression_with_state
Similar to [`infer_type_expression`], but accepts a [`DeferredExpressionState`]. [`infer_type_expression`]: TypeInferenceBuilder::infer_type_expressi
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:248
↓ 5 callers
Method
inferable_typevars
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/signatures.rs:2337
↓ 5 callers
Method
inferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:727
↓ 5 callers
Function
init
Initialize the cache at the specified `Path`.
crates/ruff/src/cache.rs:374
↓ 5 callers
Method
initial_return_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:880
↓ 5 callers
Method
insert
Add an identifier to the set of visited names in `self` and emit a [`SemanticSyntaxError`] if `ident` has already been seen.
crates/ruff_python_parser/src/semantic_errors.rs:2491
↓ 5 callers
Method
insert_with_settings_diagnostic_path
( &mut self, path: SystemPathBuf, settings_diagnostic_path: Option<SystemPathBuf>,
crates/ty_site_packages/src/lib.rs:97
↓ 5 callers
Method
instance_member
This function roughly corresponds to looking up an attribute in the `__dict__` of an object. For instance-like types, this goes through the classes MR
crates/ty_python_semantic/src/types.rs:4901
↓ 5 callers
Method
instance_member
Returns the instance member lookup.
crates/ty_python_semantic/src/types/class.rs:1059
↓ 5 callers
Method
instance_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/newtype.rs:303
↓ 5 callers
Method
interface
Returns the protocol members of this class. A protocol's members define the interface declared by the protocol. They therefore determine how the prot
crates/ty_python_semantic/src/types/protocol_class.rs:75
↓ 5 callers
Method
intersect
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:224
↓ 5 callers
Method
into_code
Consume this code example and return only the lines that have been accrued so far. This is useful when the code example being collected has been dete
crates/ruff_python_formatter/src/string/docstring.rs:823
↓ 5 callers
Method
into_diagnostic
(self, context: Context, lint_context: &LintContext)
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:341
↓ 5 callers
Method
into_error
(self)
crates/ruff_python_parser/src/error.rs:360
↓ 5 callers
Method
into_iter
(self)
crates/ty_ide/src/goto.rs:484
↓ 5 callers
Method
into_location
(self)
crates/ty_server/src/document/range.rs:47
↓ 5 callers
Method
into_result
Consumes the [`Parsed`] output and returns a [`Result`] which is [`Ok`] if it has no syntax errors, or [`Err`] containing the first [`ParseError`] enc
crates/ruff_python_parser/src/lib.rs:485
↓ 5 callers
Method
into_workspace_edit
(self)
crates/ruff_server/src/edit.rs:179
↓ 5 callers
Function
invalid_start_tag
(expected: TagKind, actual: Option<&FormatElement>)
crates/ruff_formatter/src/printer/mod.rs:1580
↓ 5 callers
Method
is_active
(self)
crates/ty_python_semantic/src/lib.rs:155
↓ 5 callers
Method
is_annotation
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:38
↓ 5 callers
Method
is_any_newline
(self)
crates/ruff_python_ast/src/token.rs:348
↓ 5 callers
Method
is_boolean_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2429
↓ 5 callers
Method
is_call_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2207
↓ 5 callers
Method
is_callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:430
↓ 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:319
↓ 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
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:838
↓ 5 callers
Method
is_enum
(self)
crates/ty_python_semantic/src/types/literal.rs:245
↓ 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:115
↓ 5 callers
Method
is_final
Is this class final?
crates/ty_python_semantic/src/types/class/static_literal.rs:881
↓ 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:1208
↓ 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:1824
↓ 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:180
↓ 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_package
(self)
crates/ty_module_resolver/src/module.rs:207
↓ 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:848
↓ 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:775
↓ 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
← previous
next →
2,701–2,800 of 31,562, ranked by callers