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

experimental string processing crash on very long variable name #2313

Closed
JelleZijlstra opened this issue Jun 7, 2021 · 1 comment · Fixed by #2332
Closed

experimental string processing crash on very long variable name #2313

JelleZijlstra opened this issue Jun 7, 2021 · 1 comment · Fixed by #2332
Labels
C: crash Black is crashing F: strings Related to our handling of strings T: bug Something isn't working

Comments

@JelleZijlstra
Copy link
Collaborator

On main with --experimental-string-processing:

% cat espcrash.py 
xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
    xx_xxxxxx={
        "x3_xxxxxxxx": f"{x3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx}_xxxxxxx",
    },
)
% black --experimental-string-processing espcrash.py         
error: cannot format espcrash.py: INTERNAL ERROR: hand-made leaf without parent: Leaf(STRING, '"x3_xxxxxxxx"')
Oh no! 💥 💔 💥
1 file failed to reformat.

cc @bbugyi200

@JelleZijlstra JelleZijlstra added C: crash Black is crashing F: strings Related to our handling of strings labels Jun 7, 2021
@ichard26 ichard26 added T: bug Something isn't working stable labels Jun 7, 2021
@ichard26 ichard26 added this to To Do in Stable release via automation Jun 7, 2021
bbugyi200 added a commit to bbugyi200/black that referenced this issue Jun 13, 2021
@bbugyi200
Copy link
Contributor

Thanks for tagging me on this. This issue should be fixed by the following PR: #2332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: crash Black is crashing F: strings Related to our handling of strings T: bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants