MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,562 in github.com/astral-sh/ruff

↓ 1 callersFunctionformat_dir_entry
Error handling in between walkdir and `format_dev_file`.
crates/ruff_dev/src/format_dev.rs:548
↓ 1 callersFunctionformat_document
Formats either a full text document or an specific notebook cell. If the query within the snapshot is a notebook document with no selected cell, this
crates/ruff_server/src/server/api/requests/format.rs:77
↓ 1 callersMethodformat_document
Format the entire document.
crates/ruff_server/src/format.rs:360
↓ 1 callersFunctionformat_document_range
Formats the specified [`Range`] in the [`DocumentSnapshot`].
crates/ruff_server/src/server/api/requests/format_range.rs:40
↓ 1 callersMethodformat_event
( &self, ctx: &FmtContext<'_, S, N>, mut writer: Writer<'_>, event: &Event<'_>
crates/ty/src/logging.rs:220
↓ 1 callersFunctionformat_external
Format using an external uv command.
crates/ruff_server/src/format.rs:106
↓ 1 callersFunctionformat_file
Check the formatting of a single docs file. Returns the exit code for the script.
scripts/check_docs_formatted.py:231
↓ 1 callersFunctionformat_file
( source: &str, options: &PyFormatOptions, input_path: &Utf8Path, )
crates/ruff_python_formatter/tests/fixtures.rs:311
↓ 1 callersFunctionformat_full_document
Formats either a full text document or each individual cell in a single notebook document.
crates/ruff_server/src/server/api/requests/format.rs:45
↓ 1 callersFunctionformat_header
Format the TOML header for the example usage for a given option. For example: `[tool.ruff.format]` or `[tool.ruff.lint.isort]`.
crates/ruff_dev/src/generate_options.rs:168
↓ 1 callersFunctionformat_import
Add a plain import statement to the [`RopeBuilder`].
crates/ruff_linter/src/rules/isort/format.rs:11
↓ 1 callersFunctionformat_import
Format the `import mock` rewrite.
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:169
↓ 1 callersFunctionformat_import_block
( block: ImportBlock, line_length: LineLength, indentation_width: LineWidthBuilder, stylist: &
crates/ruff_linter/src/rules/isort/mod.rs:154
↓ 1 callersFunctionformat_import_from
Format the module reference name for a relative import. # Examples ```rust # use ruff_python_ast::helpers::format_import_from; assert_eq!(format_im
crates/ruff_python_ast/src/helpers.rs:955
↓ 1 callersFunctionformat_import_from
Format the `from mock import ...` rewrite.
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:194
↓ 1 callersMethodformat_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 callersFunctionformat_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 callersFunctionformat_imports
( block: &Block, comments: Vec<Comment>, locator: &Locator, line_length: LineLength, inden
crates/ruff_linter/src/rules/isort/mod.rs:68
↓ 1 callersFunctionformat_in_gettext_func_call
INT002
crates/ruff_linter/src/rules/flake8_gettext/rules/format_in_gettext_func_call.rs:69
↓ 1 callersFunctionformat_int_metric
(diff: int, old: int, new: int, total: int)
scripts/conformance.py:906
↓ 1 callersFunctionformat_internal
Format using the built-in Ruff formatter.
crates/ruff_server/src/format.rs:61
↓ 1 callersFunctionformat_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 callersMethodformat_ir
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:491
↓ 1 callersFunctionformat_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 callersFunctionformat_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 callersFunctionformat_literals
UP030
crates/ruff_linter/src/rules/pyupgrade/rules/format_literals.rs:68
↓ 1 callersFunctionformat_metric
(diff: float, old: float, new: float)
scripts/conformance.py:899
↓ 1 callersFunctionformat_multi_line
Format an import-from statement in multi-line format.
crates/ruff_linter/src/rules/isort/format.rs:198
↓ 1 callersFunctionformat_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 callersFunctionformat_number
Underscore-separate the digits of a number.
scripts/update_ambiguous_characters.py:72
↓ 1 callersFunctionformat_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 callersMethodformat_options
(&self, file: File)
crates/ty_project/src/db.rs:727
↓ 1 callersFunctionformat_outcome
Format the outcome indicator.
scripts/memory_report.py:133
↓ 1 callersFunctionformat_patchset
Convert a patchset to markdown, adding permalinks to the start of each hunk.
python/ruff-ecosystem/ruff_ecosystem/format.py:112
↓ 1 callersFunctionformat_pycon_block
( source: &str, path: Option<&Path>, settings: &FormatterSettings, )
crates/ruff_markdown/src/lib.rs:150
↓ 1 callersMethodformat_range
Format a specific range.
crates/ruff_server/src/format.rs:365
↓ 1 callersFunctionformat_range_external
Format range using an external command, i.e., `uv`.
crates/ruff_server/src/format.rs:189
↓ 1 callersFunctionformat_range_internal
Format range using the built-in Ruff formatter
crates/ruff_server/src/format.rs:160
↓ 1 callersMethodformat_range_request
Send a `textDocument/rangeFormatting` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:844
↓ 1 callersFunctionformat_replacements
(replacements: Vec<(char, &str)>)
crates/ruff_annotate_snippets/src/renderer/render.rs:2866
↓ 1 callersFunctionformat_rule_text
(rule: Rule)
crates/ruff_server/src/server/api/requests/hover.rs:113
↓ 1 callersFunctionformat_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 callersFunctionformat_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 callersFunctionformat_source_code
Format source code read from `stdin`.
crates/ruff/src/commands/format_stdin.rs:84
↓ 1 callersFunctionformat_stdin
Run the formatter over a single file, read from `stdin`.
crates/ruff/src/commands/format_stdin.rs:21
↓ 1 callersFunctionformat_str
Format a code block with ruff by writing to a temporary file.
scripts/check_docs_formatted.py:175
↓ 1 callersFunctionformat_tab
(tab_name: &str, header: &str, content: &str)
crates/ruff_dev/src/generate_ty_options.rs:182
↓ 1 callersFunctionformat_tab
(tab_name: &str, header: &str, content: &str)
crates/ruff_dev/src/generate_options.rs:156
↓ 1 callersFunctionformat_text_document_range
Formats the specified [`Range`] in the [`TextDocument`].
crates/ruff_server/src/server/api/requests/format_range.rs:55
↓ 1 callersFunctionformat_then_format
( baseline_formatter: Formatter, ruff_baseline_executable: Path, ruff_comparison_executable: Path,
python/ruff-ecosystem/ruff_ecosystem/format.py:169
↓ 1 callersFunctionformat_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 callersMethodformatted
( self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/range_formatting/fmt_on_off.py:20
↓ 1 callersFunctionformatted_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 callersFunctionformatted_file
(db: &dyn Db, file: File)
crates/ruff_python_formatter/src/lib.rs:186
↓ 1 callersMethodforward_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 callersMethodforward_empty_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, )
crates/ty_python_semantic/src/types/tuple.rs:1799
↓ 1 callersMethodforward_slice_plan
( &self, start: Option<i32>, stop: Option<i32>, step: NonZeroUsize, )
crates/ty_python_semantic/src/types/tuple.rs:1724
↓ 1 callersMethodforwards
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:1308
↓ 1 callersMethodfound
(&self)
crates/ruff_linter/src/rules/pyupgrade/rules/super_call_with_parameters.rs:338
↓ 1 callersMethodfound_satisfied_path
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:1699
↓ 1 callersMethodfree_threaded_stdlib_fallback_path
(self)
crates/ty_site_packages/src/lib.rs:683
↓ 1 callersMethodfreeze_open_files
Permanently marks the project as never having open files.
crates/ty_project/src/db.rs:149
↓ 1 callersMethodfreshen_bound_typevars
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, delta: u32, )
crates/ty_python_semantic/src/types/call/bind.rs:9269
↓ 1 callersMethodfreshen_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 callersMethodfreshen_for_owner_specialization
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, specialization: Speci
crates/ty_python_semantic/src/types/signatures.rs:246
↓ 1 callersMethodfreshen_generic_contexts_in_place
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, nonce_generator:
crates/ty_python_semantic/src/types/call/bind.rs:393
↓ 1 callersFunctionfreshen_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 callersMethodfreshen_with_mapping
( self, db: &'db dyn Db, nonce: TypeVarNonce, type_mapping: &TypeMapping<'_, '
crates/ty_python_semantic/src/types/typevar.rs:1591
↓ 1 callersMethodfreshening_delta_for
( &self, db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/signatures.rs:1309
↓ 1 callersFunctionfrobnicate
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_return_annotation_brackets_string.py:2
↓ 1 callersMethodfrom_diff
Parse a diff from `ruff check` to determine the additions and removals for each rule
python/ruff-ecosystem/ruff_ecosystem/check.py:345
↓ 1 callersMethodfrom_file
(repo: &Path)
crates/ruff_dev/src/format_dev.rs:935
↓ 1 callersMethodfrom_float
(value: f64)
crates/ruff_python_ast/src/comparable.rs:2170
↓ 1 callersFunctionfrom_future_import
PYI044
crates/ruff_linter/src/rules/flake8_pyi/rules/future_annotations_in_stub.rs:41
↓ 1 callersMethodfrom_gitlab_output
( cls, dct: dict[str, Any], source: Source, )
scripts/conformance.py:221
↓ 1 callersMethodfrom_import_completions
Returns completions for symbols available in a `from module import <CURSOR>` context.
crates/ty_python_semantic/src/semantic_model.rs:205
↓ 1 callersMethodfrom_path
(cls, path: Path, repo: Repository)
python/ruff-ecosystem/ruff_ecosystem/projects.py:460
↓ 1 callersFunctionfrom_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:1057
↓ 1 callersMethodfrom_simple_diff
Parse a simple diff to include check-specific analyses.
python/ruff-ecosystem/ruff_ecosystem/check.py:456
↓ 1 callersFunctionfromisoformat_replace_z
FURB162
crates/ruff_linter/src/rules/refurb/rules/fromisoformat_replace_z.rs:86
↓ 1 callersFunctionfstring
()
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:173
↓ 1 callersFunctionfstring_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 callersFunctionfstring_number_format
FURB116
crates/ruff_linter/src/rules/refurb/rules/fstring_number_format.rs:74
↓ 1 callersFunctionfstring_percent_format
RUF073
crates/ruff_linter/src/rules/ruff/rules/fstring_percent_format.rs:42
↓ 1 callersMethodfull
()
crates/ty_project/src/walk.rs:132
↓ 1 callersMethodfull_file_range
(&self)
crates/ty_ide/src/lib.rs:165
↓ 1 callersMethodfull_line_str
Returns the text of the `offset`'s line. See [`LineRanges::full_lines_str`].
crates/ruff_linter/src/locator.rs:125
↓ 1 callersMethodfull_name
(self)
crates/ruff_linter/src/rules/refurb/rules/regex_flag_alias.rs:120
↓ 1 callersMethodfull_text_len
(&self)
crates/ruff_source_file/src/newlines.rs:272
↓ 1 callersFunctionfull_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 callersFunctionfun
(arg)
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_0.py:23
↓ 1 callersFunctionfun
(x, y)
crates/ruff_linter/resources/test/fixtures/pyflakes/F811_22.py:5
↓ 1 callersFunctionfunc
(a: T)
crates/ruff_python_parser/resources/valid/statement/function.py:92
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:4
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB129.py:24
↓ 1 callersFunctionfunc
( a = 3 )
crates/ruff_linter/resources/test/fixtures/flake8_commas/COM81.py:309
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/syntax_errors/await_outside_async_function.py:1
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE810.py:12
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:90
↓ 1 callersFunctionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_use_pathlib/full_name.py:78
← previousnext →9,601–9,700 of 31,562, ranked by callers