mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Normalize implicit concatenated f-string quotes per part (#13539)
This commit is contained in:
parent
42fcbef876
commit
fc661e193a
11 changed files with 171 additions and 62 deletions
|
@ -33,14 +33,15 @@ node_lines = (
|
|||
nodes = []
|
||||
for node_line in node_lines:
|
||||
node = node_line.split("(")[1].split(")")[0].split("::")[-1].split("<")[0]
|
||||
# `FString` and `StringLiteral` has a custom implementation while the formatting for
|
||||
# `FStringLiteralElement` and `FStringExpressionElement` are handled by the `FString`
|
||||
# `FString` has a custom implementation while the formatting for
|
||||
# `FStringLiteralElement`, `FStringFormatSpec` and `FStringExpressionElement` are handled by the `FString`
|
||||
# implementation.
|
||||
if node in (
|
||||
"FString",
|
||||
"StringLiteral",
|
||||
"FStringLiteralElement",
|
||||
"FStringExpressionElement",
|
||||
"FStringFormatSpec",
|
||||
"Identifier",
|
||||
):
|
||||
continue
|
||||
nodes.append(node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue