mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Introduce IndentWidth
(#7301)
This commit is contained in:
parent
e122a96d27
commit
2d9b39871f
26 changed files with 187 additions and 199 deletions
|
@ -353,7 +353,7 @@ impl Format<PyFormatContext<'_>> for FormatTrailingEndOfLineComment<'_> {
|
|||
} else {
|
||||
// Start with 2 because of the two leading spaces.
|
||||
let width = 2u32.saturating_add(
|
||||
TextWidth::from_text(&normalized_comment, f.options().tab_width())
|
||||
TextWidth::from_text(&normalized_comment, f.options().indent_width())
|
||||
.width()
|
||||
.expect("Expected comment not to contain any newlines")
|
||||
.value(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue