Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad formatting of multiline f-strings #369

Closed
yutkin opened this issue Jun 21, 2018 · 1 comment
Closed

Bad formatting of multiline f-strings #369

yutkin opened this issue Jun 21, 2018 · 1 comment

Comments

@yutkin
Copy link

yutkin commented Jun 21, 2018

This code

str = f"this" \
      f"is a very" \
      f" long " \
      f"string."

print(str)

Black converts to

str = f"this" f"is a very" f" long " f"string."

print(str)

Why not just concatenate it to str = f"this is a very long string."?

black, version 18.6b3
Python 3.6.5

@zsol
Copy link
Collaborator

zsol commented Jun 21, 2018

This is a dupe of #26, we're going to fix it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants