You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: cannot format example.py: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /tmp/blk_o04ck2zv.log
Oh no! 💥 💔 💥
1 file failed to reformat.
This is arguably a bug in CPython. The issue is that when using ast.parse(type_comments=True), when there is a type comment, the parentheses change how the with statement is parsed:
Describe the bug
The following code can not be formatted
when run with these arguments:
The error is:
Environment
python -m black, 23.3.1.dev10+geb32729 (compiled: no)
Python (CPython) 3.11.3
Additional context
The text was updated successfully, but these errors were encountered: