mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Remove some unnecessary ampersands in the formatter (#6667)
This commit is contained in:
parent
8e18f8018f
commit
3ceb6fbeb0
9 changed files with 13 additions and 13 deletions
|
@ -41,7 +41,7 @@ impl FormatNodeRule<ExprDictComp> for FormatExprDictComp {
|
|||
space(),
|
||||
value.format(),
|
||||
soft_line_break_or_space(),
|
||||
&joined
|
||||
joined
|
||||
)),
|
||||
"}"
|
||||
)
|
||||
|
|
|
@ -68,7 +68,7 @@ impl FormatNodeRule<ExprGeneratorExp> for FormatExprGeneratorExp {
|
|||
&group(&format_args!(
|
||||
group(&elt.format()),
|
||||
soft_line_break_or_space(),
|
||||
&joined
|
||||
joined
|
||||
)),
|
||||
")"
|
||||
)
|
||||
|
|
|
@ -36,7 +36,7 @@ impl FormatNodeRule<ExprListComp> for FormatExprListComp {
|
|||
&group(&format_args![
|
||||
group(&elt.format()),
|
||||
soft_line_break_or_space(),
|
||||
&joined
|
||||
joined
|
||||
]),
|
||||
"]"
|
||||
)
|
||||
|
|
|
@ -36,7 +36,7 @@ impl FormatNodeRule<ExprSetComp> for FormatExprSetComp {
|
|||
&group(&format_args!(
|
||||
group(&elt.format()),
|
||||
soft_line_break_or_space(),
|
||||
&joined
|
||||
joined
|
||||
)),
|
||||
"}"
|
||||
)
|
||||
|
|
|
@ -153,8 +153,8 @@ impl<'ast> Format<PyFormatContext<'ast>> for FormatParenthesized<'_, 'ast> {
|
|||
let inner = format_with(|f| {
|
||||
group(&format_args![
|
||||
text(self.left),
|
||||
&dangling_open_parenthesis_comments(self.comments),
|
||||
&soft_block_indent(&Arguments::from(&self.content)),
|
||||
dangling_open_parenthesis_comments(self.comments),
|
||||
soft_block_indent(&Arguments::from(&self.content)),
|
||||
text(self.right)
|
||||
])
|
||||
.fmt(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue