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

Multi-line strings possibly not corrected properly #261

Closed
BenjaminBossan opened this issue May 26, 2018 · 1 comment
Closed

Multi-line strings possibly not corrected properly #261

BenjaminBossan opened this issue May 26, 2018 · 1 comment

Comments

@BenjaminBossan
Copy link

In my code base, I usually handle long strings by breaking them within parens. When black puts the split string onto one line, it still keeps the strings separate. The example below should make it clear:

-            raise IndexError("arrays used as indices must be of integer "
-                             "(or boolean) type")
+            raise IndexError(
+                "arrays used as indices must be of integer " "(or boolean) type"
+            )

Question is: Can this be fixed or is there a reason why it needs to be this way?

Operating system: Ubuntu 18.04
Python version: 3.6
Black version: 18.5b0
Does also happen on master: yes

@zsol
Copy link
Collaborator

zsol commented May 26, 2018

This looks like a duplicate of #26
We're definitely planning to fix this but it's not trivial for the reasons pointed out in #26.

@zsol zsol closed this as completed May 26, 2018
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