Describe the bug
When you have multiple f-strings (I suspect without a + between them) then when it reformats them it
will just remove the new lines without merging the strings into a single compound string, e.g. f"{1}" f" {2}"
rather than f"{1} {2}"
To Reproduce
c.run(
f"docker login {self.hostname} "
f"--username {self.username} "
f"--password {self.password}",
)
For example, take this code:
And run it with these arguments:
The resulting error is:
c.run(
- f"docker login {self.hostname} "
- f"--username {self.username} "
- f"--password {self.password}",
+ f"docker login {self.hostname} " f"--username {self.username} " f"--password {self.password}",
)
Expected behavior
c.run(
- f"docker login {self.hostname} "
- f"--username {self.username} "
- f"--password {self.password}",
+ f"docker login {self.hostname} --username {self.username} --password {self.password}",
)
Environment
- Black's version: black, 21.12b0 (compiled: no)
- OS and Python version: Mac/Python 3.9
Additional context
Describe the bug
When you have multiple f-strings (I suspect without a
+between them) then when it reformats them itwill just remove the new lines without merging the strings into a single compound string, e.g.
f"{1}" f" {2}"rather than
f"{1} {2}"To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
Expected behavior
Environment
Additional context