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
↓ 1 callers
Function
format_import_from
Format the `from mock import ...` rewrite.
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:194
↓ 1 callers
Method
format_import_from
Converts a list of names and a module into an `import from`-style import.
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs:738
↓ 1 callers
Function
format_import_from_member
Format the member reference name for a relative import. # Examples ```rust # use ruff_python_ast::helpers::format_import_from_member; assert_eq!(fo
crates/ruff_python_ast/src/helpers.rs:983
↓ 1 callers
Function
format_imports
( block: &Block, comments: Vec<Comment>, locator: &Locator, line_length: LineLength, inden
crates/ruff_linter/src/rules/isort/mod.rs:68
↓ 1 callers
Function
format_in_gettext_func_call
INT002
crates/ruff_linter/src/rules/flake8_gettext/rules/format_in_gettext_func_call.rs:69
↓ 1 callers
Function
format_int_metric
(diff: int, old: int, new: int, total: int)
scripts/conformance.py:888
↓ 1 callers
Function
format_internal
Format using the built-in Ruff formatter.
crates/ruff_server/src/format.rs:61
↓ 1 callers
Function
format_interpolated_string_assignment
Formats an f/t-string that is at the value position of an assignment statement. For legibility, we discuss only the case of f-strings below, but the
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1116
↓ 1 callers
Method
format_ir
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:491
↓ 1 callers
Function
format_leading_hashes
Format a comment to strip multiple leading `#` characters.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/whitespace_before_comment.rs:267
↓ 1 callers
Function
format_leading_space
Format a comment to have a single space after the `#`.
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/whitespace_before_comment.rs:258
↓ 1 callers
Function
format_literals
UP030
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:68
↓ 1 callers
Function
format_metric
(diff: float, old: float, new: float)
scripts/conformance.py:881
↓ 1 callers
Function
format_multi_line
Format an import-from statement in multi-line format.
crates/ruff_linter/src/rules/isort/format.rs:198
↓ 1 callers
Function
format_normalized_comment
A helper that constructs formattable normalized comment text as efficiently as possible. If the content is unaltered then format with source text sli
crates/ruff_python_formatter/src/comments/format.rs:423
↓ 1 callers
Function
format_number
Underscore-separate the digits of a number.
scripts/update_ambiguous_characters.py:54
↓ 1 callers
Function
format_once
Creates an inline `Format` object that can only be formatted once. This can be useful in situation where the borrow checker doesn't allow you to use
crates/ruff_formatter/src/builders.rs:2400
↓ 1 callers
Method
format_options
(&self, file: File)
crates/ty_project/src/db.rs:727
↓ 1 callers
Function
format_outcome
Format the outcome indicator.
scripts/memory_report.py:115
↓ 1 callers
Function
format_patchset
Convert a patchset to markdown, adding permalinks to the start of each hunk.
python/ruff-ecosystem/ruff_ecosystem/format.py:111
↓ 1 callers
Function
format_pycon_block
( source: &str, path: Option<&Path>, settings: &FormatterSettings, )
crates/ruff_markdown/src/lib.rs:150
↓ 1 callers
Method
format_range
Format a specific range.
crates/ruff_server/src/format.rs:365
↓ 1 callers
Function
format_range_external
Format range using an external command, i.e., `uv`.
crates/ruff_server/src/format.rs:189
↓ 1 callers
Function
format_range_internal
Format range using the built-in Ruff formatter
crates/ruff_server/src/format.rs:160
↓ 1 callers
Method
format_range_request
Send a `textDocument/rangeFormatting` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:844
↓ 1 callers
Function
format_replacements
(replacements: Vec<(char, &str)>)
crates/ruff_annotate_snippets/src/renderer/render.rs:2866
↓ 1 callers
Function
format_rule_text
(rule: Rule)
crates/ruff_server/src/server/api/requests/hover.rs:113
↓ 1 callers
Function
format_single_line
Format an import-from statement in single-line format. This method assumes that the output source code is syntactically valid.
crates/ruff_linter/src/rules/isort/format.rs:110
↓ 1 callers
Function
format_snippet
Format the TOML header for the example usage for a given option. For example: `[tool.ty.rules]`.
crates/ruff_dev/src/generate_ty_options.rs:198
↓ 1 callers
Function
format_source_code
Format source code read from `stdin`.
crates/ruff/src/commands/format_stdin.rs:82
↓ 1 callers
Function
format_stdin
Run the formatter over a single file, read from `stdin`.
crates/ruff/src/commands/format_stdin.rs:21
↓ 1 callers
Function
format_str
Format a code block with ruff by writing to a temporary file.
scripts/check_docs_formatted.py:157
↓ 1 callers
Function
format_tab
(tab_name: &str, header: &str, content: &str)
crates/ruff_dev/src/generate_ty_options.rs:182
↓ 1 callers
Function
format_tab
(tab_name: &str, header: &str, content: &str)
crates/ruff_dev/src/generate_options.rs:156
↓ 1 callers
Function
format_text_document_range
Formats the specified [`Range`] in the [`TextDocument`].
crates/ruff_server/src/server/api/requests/format_range.rs:55
↓ 1 callers
Function
format_then_format
( baseline_formatter: Formatter, ruff_baseline_executable: Path, ruff_comparison_executable: Path,
python/ruff-ecosystem/ruff_ecosystem/format.py:168
↓ 1 callers
Function
format_with_parentheses_comments
The comments below are trailing on the addition, but it's also outside the parentheses ```python x = [ # comment leading (1 + 2) # comment trailing ]
crates/ruff_python_formatter/src/expression/mod.rs:192
↓ 1 callers
Method
formatted
( self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/range_formatting/fmt_on_off.py:20
↓ 1 callers
Function
formatted_expr
Given an [`Expr`], format it for use in a formatted expression within an f-string.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:216
↓ 1 callers
Function
formatted_file
(db: &dyn Db, file: File)
crates/ruff_python_formatter/src/lib.rs:186
↓ 1 callers
Method
forward_comprehension_binding
Passes a walrus binding out through nested comprehensions. ```python [[(last := item) for item in row] for row in rows] print(last) # `last` belongs
crates/ty_python_core/src/builder.rs:2086
↓ 1 callers
Method
forward_empty_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, )
crates/ty_python_semantic/src/types/tuple.rs:1799
↓ 1 callers
Method
forward_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1724
↓ 1 callers
Method
forwards
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1308
↓ 1 callers
Method
found
(&self)
crates/ruff_linter/src/rules/pyupgrade/rules/super_call_with_parameters.rs:335
↓ 1 callers
Method
found_satisfied_path
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:1713
↓ 1 callers
Method
free_threaded_stdlib_fallback_path
(self)
crates/ty_site_packages/src/lib.rs:683
↓ 1 callers
Method
freeze_open_files
Permanently marks the project as never having open files.
crates/ty_project/src/db.rs:149
↓ 1 callers
Method
freshen_bound_typevars
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, delta: u32, )
crates/ty_python_semantic/src/types/call/bind.rs:9403
↓ 1 callers
Method
freshen_class_typevars
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, generic_context:
crates/ty_python_semantic/src/types/call/bind/constructor.rs:137
↓ 1 callers
Method
freshen_for_owner_specialization
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, specialization: Speci
crates/ty_python_semantic/src/types/signatures.rs:225
↓ 1 callers
Method
freshen_generic_contexts_in_place
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, nonce_generator:
crates/ty_python_semantic/src/types/call/bind.rs:406
↓ 1 callers
Function
freshen_generic_contexts_in_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, generic_contexts: FxOrderSet<
crates/ty_python_semantic/src/types/call/bind.rs:216
↓ 1 callers
Method
freshen_with_mapping
( self, db: &'db dyn Db, nonce: TypeVarNonce, type_mapping: &TypeMapping<'_, '
crates/ty_python_semantic/src/types/typevar.rs:1639
↓ 1 callers
Method
freshening_delta_for
( &self, db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/signatures.rs:1282
↓ 1 callers
Function
frobnicate
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_return_annotation_brackets_string.py:2
↓ 1 callers
Method
from_diff
Parse a diff from `ruff check` to determine the additions and removals for each rule
python/ruff-ecosystem/ruff_ecosystem/check.py:344
↓ 1 callers
Method
from_file
(repo: &Path)
crates/ruff_dev/src/format_dev.rs:935
↓ 1 callers
Method
from_float
(value: f64)
crates/ruff_python_ast/src/comparable.rs:2170
↓ 1 callers
Function
from_future_import
PYI044
crates/ruff_linter/src/rules/flake8_pyi/rules/future_annotations_in_stub.rs:41
↓ 1 callers
Method
from_gitlab_output
( cls, dct: dict[str, Any], source: Source, )
scripts/conformance.py:203
↓ 1 callers
Method
from_import_completions
Returns completions for symbols available in a `from module import <CURSOR>` context.
crates/ty_python_semantic/src/semantic_model.rs:205
↓ 1 callers
Method
from_path
(cls, path: Path, repo: Repository)
python/ruff-ecosystem/ruff_ecosystem/projects.py:496
↓ 1 callers
Function
from_relative_import
Format the call path for a relative import, or `None` if the relative import extends beyond the root module.
crates/ruff_python_ast/src/helpers.rs:1053
↓ 1 callers
Method
from_simple_diff
Parse a simple diff to include check-specific analyses.
python/ruff-ecosystem/ruff_ecosystem/check.py:455
↓ 1 callers
Function
fromisoformat_replace_z
FURB162
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:86
↓ 1 callers
Function
fstring
()
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:173
↓ 1 callers
Function
fstring_elements_to_string_literals
Converts a list of `FStringElement`s to a list of `StringLiteral`s. If any of the elements are not string literals, `None` is returned. This is usef
crates/ruff_linter/src/rules/ruff/rules/assert_with_print_message.rs:149
↓ 1 callers
Function
fstring_number_format
FURB116
crates/ruff_linter/src/rules/refurb/rules/fstring_number_format.rs:74
↓ 1 callers
Function
fstring_percent_format
RUF073
crates/ruff_linter/src/rules/ruff/rules/fstring_percent_format.rs:42
↓ 1 callers
Method
full
()
crates/ty_project/src/walk.rs:136
↓ 1 callers
Method
full_file_range
(&self)
crates/ty_ide/src/lib.rs:165
↓ 1 callers
Method
full_line_str
Returns the text of the `offset`'s line. See [`LineRanges::full_lines_str`].
crates/ruff_linter/src/locator.rs:125
↓ 1 callers
Method
full_name
(self)
crates/ruff_linter/src/rules/refurb/rules/regex_flag_alias.rs:120
↓ 1 callers
Method
full_text_len
(&self)
crates/ruff_source_file/src/newlines.rs:272
↓ 1 callers
Function
full_type_bindings_for_call
Fully binds and type-checks a call expression against the given callee type. This is the expensive path for call-argument form analysis: it matches c
crates/ty_python_semantic/src/types/ide_support.rs:1243
↓ 1 callers
Function
fun
(arg)
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_0.py:23
↓ 1 callers
Function
fun
(x, y)
crates/ruff_linter/resources/test/fixtures/pyflakes/F811_22.py:5
↓ 1 callers
Function
func
(a: T)
crates/ruff_python_parser/resources/valid/statement/function.py:92
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:4
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB129.py:24
↓ 1 callers
Function
func
( a = 3 )
crates/ruff_linter/resources/test/fixtures/flake8_commas/COM81.py:309
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/syntax_errors/await_outside_async_function.py:1
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE810.py:12
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:90
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/flake8_use_pathlib/full_name.py:78
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF016.py:101
↓ 1 callers
Function
func
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:23
↓ 1 callers
Function
func
(address)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S104.py:1
↓ 1 callers
Function
func
(i)
crates/ruff_linter/resources/test/fixtures/pylint/await_outside_async.py:18
↓ 1 callers
Function
func
(a=10, b=20, c=30)
crates/ruff_linter/resources/test/fixtures/pylint/repeated_keyword_argument.py:1
↓ 1 callers
Method
func
Docstring
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE790.py:185
↓ 1 callers
Function
func2
( )
crates/ruff_linter/resources/test/fixtures/flake8_commas/COM81.py:105
↓ 1 callers
Function
func2
()
crates/ruff_linter/resources/test/fixtures/pylint/await_outside_async.py:27
↓ 1 callers
Function
func_is_fromisoformat
(func: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:129
↓ 1 callers
Function
function
( posonly_nohint, posonly_nonboolhint: int, posonly_boolhint: bool, posonly_boolstrhint: "bool
crates/ruff_linter/resources/test/fixtures/flake8_boolean_trap/FBT.py:1
↓ 1 callers
Function
function
( foo, bar, **kwargs )
crates/ruff_linter/resources/test/fixtures/flake8_commas/COM81.py:516
↓ 1 callers
Function
function
Run all checks from the `flake8-return` plugin, but `RET504` which is ran after the semantic model is fully built.
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:765
↓ 1 callers
Function
function
Generate a function definition from a `lambda` expression.
crates/ruff_linter/src/rules/pycodestyle/rules/lambda_assignment.rs:187
↓ 1 callers
Function
function
Check a plain function for unused arguments.
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:294
← previous
next →
9,701–9,800 of 31,766, ranked by callers