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

Line too long: string literal doesn't get split #4320

Closed
crhf opened this issue Apr 22, 2024 · 1 comment
Closed

Line too long: string literal doesn't get split #4320

crhf opened this issue Apr 22, 2024 · 1 comment
Labels
T: bug Something isn't working

Comments

@crhf
Copy link

crhf commented Apr 22, 2024

Describe the bug

A long string literal doesn't get split.

To Reproduce

For example, take this code:

x = "aaaaaaaaaa bbbbbbbb cccccccccccc dddddddddddddd eeeeeeeeeeee fffffffffffffffff ggggggggggggggg hhhhhhhhhh"

And run it with these arguments:

$ black file.py

The file is left unchanged.

Expected behavior

The string gets split into something like:

x = (
    "aaa ..   . fff"
    "fff ... gggggggggg.."
)

Environment

  • Black's version: 24.4.0 (compiled: yes)
  • OS and Python version: WSL ubuntu 22.04, python 3.11.7
@crhf crhf added the T: bug Something isn't working label Apr 22, 2024
@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Apr 22, 2024

Duplicate of #4230 (see also #4208)

@hauntsaninja hauntsaninja marked this as a duplicate of #4230 Apr 22, 2024
@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants