mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:24 +00:00
[flake8-pytest-style
] Add a space after comma in CSV output (PT006
) (#12853)
## Summary See #12703. This only addresses the first bullet point, adding a space after the comma in the suggested fix from list/tuple to string. ## Test Plan Updated the snapshots and compared.
This commit is contained in:
parent
7027344dfc
commit
82a3e69b8a
2 changed files with 3 additions and 3 deletions
|
@ -292,7 +292,7 @@ fn elts_to_csv(elts: &[Expr], generator: Generator) -> Option<String> {
|
|||
.fold(String::new(), |mut acc, elt| {
|
||||
if let Expr::StringLiteral(ast::ExprStringLiteral { value, .. }) = elt {
|
||||
if !acc.is_empty() {
|
||||
acc.push(',');
|
||||
acc.push_str(", ");
|
||||
}
|
||||
acc.push_str(value.to_str());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue