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

BUG: extra " " inserted when reformatting long string literals #1051

Closed
jbrockmendel opened this issue Oct 8, 2019 · 1 comment
Closed

Comments

@jbrockmendel
Copy link

See e.g. https://github.com/pandas-dev/pandas/pull/28857/files

Before using black, we have something like:

raise NotImplementedError(
        "foo bar"
        "baz"
    )

After using black, the string is reformatted with an unwanted " ":

raise NotImplementedError("foo bar" "baz")

Whereas we would want

raise NotImplementedError("foo bar baz")

Would a PR addressing this be accepted?

@JelleZijlstra
Copy link
Collaborator

This isn't really a bug, since the output still behaves the same, it's just suboptimal formatting. There is already an enhancement request for merging implicitly concatenated strings on the same line: #26.

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