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

INTERNAL ERROR: Black produced invalid code: invalid syntax #1111

Closed
bhearsum opened this issue Oct 29, 2019 · 4 comments
Closed

INTERNAL ERROR: Black produced invalid code: invalid syntax #1111

bhearsum opened this issue Oct 29, 2019 · 4 comments
Labels
C: invalid code Black destroyed a valid Python file T: bug Something isn't working

Comments

@bhearsum
Copy link

Tried this with both 19.10b0 and master (6bedb5c).

  File "/home/bhearsum/.local/lib/python3.7/site-packages/black.py", line 3388, in assert_equivalent
    dst_ast = ast.parse(dst)
  File "/usr/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)

https://gist.github.com/mozbhearsum/3754deeab4785419e5efafd683420b0e

@bhearsum bhearsum added the T: bug Something isn't working label Oct 29, 2019
@ichard26 ichard26 added the C: invalid code Black destroyed a valid Python file label Sep 20, 2020
@jeffwidman
Copy link

@bhearsum I can't access the gist?

@JelleZijlstra
Copy link
Collaborator

Looks like it's https://gist.github.com/bhearsum/3754deeab4785419e5efafd683420b0e now

@JelleZijlstra
Copy link
Collaborator

The gist has a syntax error in it. Closing as I don't know how to reproduce it.

@ichard26
Copy link
Collaborator

My hunch is that the gist is the invalid output produced by Black, in which case is probably another case of #569, but I don't feel like checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: invalid code Black destroyed a valid Python file T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants