mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
Range formatting: Fix invalid syntax after parenthesizing expression (#9751)
This commit is contained in:
parent
50bfbcf568
commit
4f7fb566f0
24 changed files with 351 additions and 212 deletions
|
@ -74,7 +74,7 @@ impl Format<PyFormatContext<'_>> for DotDelimitedIdentifier<'_> {
|
|||
.chars()
|
||||
.filter(|c| !is_python_whitespace(*c) && !matches!(c, '\n' | '\r' | '\\'))
|
||||
.collect();
|
||||
text(&no_whitespace, Some(self.0.start())).fmt(f)
|
||||
text(&no_whitespace).fmt(f)
|
||||
} else {
|
||||
source_text_slice(self.0.range()).fmt(f)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue