-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 formatting await (a**b) #3676
Labels
C: crash
Black is crashing
F: parentheses
Too many parentheses, not enough parentheses, and so on.
T: bug
Something isn't working
Comments
JelleZijlstra
added
C: crash
Black is crashing
F: parentheses
Too many parentheses, not enough parentheses, and so on.
labels
May 4, 2023
Thanks! I suppose we get the precedence wrong and incorrectly remove the parentheses. Let us know if you find additional crashes while fuzzing. |
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: parentheses
Too many parentheses, not enough parentheses, and so on.
T: bug
Something isn't working
Describe the bug
black converts
await (a**b)
intoawait a ** b
(if run with --fast)To Reproduce
And run it with these arguments:
The resulting error is:
Expected behavior
black should preserve the braces and be able to format the file
Environment
python -m black, 23.3.1.dev10+geb32729 (compiled: no)
Python (CPython) 3.11.3
Additional context
error log:
For context:
I currently write a generator wich generates random python code. This is still work in progress, but finding bugs in black shows me that I am on the right track.
I will provide a script similar to
scripts/fuzz.py
as soon as it is ready.The text was updated successfully, but these errors were encountered: