
x = 1
print("aa" f"{x}")
print(f"{x}" "ab")
print("a{}a" f"{x}")
print(f"{x}" "a{}b")


x, y = 1, 2
print("aa" f"{x}")  # works
print(f"{x}" "ab")  # works
print("a{}a" f"{x}")  # fails
print(f"{x}" "a{}b")  # fails
print(f"{x}" f"{y}")  # fails

Clarify f-string diffs regarding concatenation.
tests/cpydiff: Clarify f-string diffs regarding concatenation.

Concatenation of any literals (including f-strings) should be avoided.

Signed-off-by: Jim Mussared <e84f5c941266186d0c97dcc873413469b954847e@gmail.com>

  
- x = 1
+ x, y = 1, 2
- print("aa" f"{x}")
+ print("aa" f"{x}")  # works
- print(f"{x}" "ab")
+ print(f"{x}" "ab")  # works
- print("a{}a" f"{x}")
+ print("a{}a" f"{x}")  # fails
- print(f"{x}" "a{}b")
+ print(f"{x}" "a{}b")  # fails
+ print(f"{x}" f"{y}")  # fails
  
Clarify f-string diffs regarding concatenation.
## Code Before:

x = 1
print("aa" f"{x}")
print(f"{x}" "ab")
print("a{}a" f"{x}")
print(f"{x}" "a{}b")

## Instruction:
Clarify f-string diffs regarding concatenation.
## Code After:

x, y = 1, 2
print("aa" f"{x}")  # works
print(f"{x}" "ab")  # works
print("a{}a" f"{x}")  # fails
print(f"{x}" "a{}b")  # fails
print(f"{x}" f"{y}")  # fails
