-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
T: bugSomething isn't workingSomething isn't working
Description
Operating system: Linux but unlikely to be OS specific
Python version: 3.7.1
Black version: 18.9b0
Does also happen on master: Yes (as of 32eed7d)
The following code (extracted from test_asyncgen.py in CPython) is currently not handled by black:
def make_arange(n):
# This syntax is legal starting with Python 3.7
return (i * 2 for i in range(n) if await wrap(i))Running black on it results in:
error: cannot format test_asyncgen.py: Cannot parse: 3:45: return (i * 2 for i in range(n) if await wrap(i))
All done! 💥 💔 💥
1 file failed to reformat.
As per the comment, this is new Python 3.7 syntax, so presumably "just" a case of needing to update the parser to reflect the grammar change.
madsmtm, cypreess, razumau, ludwigschubert, tdhopper and 5 more
Metadata
Metadata
Assignees
Labels
T: bugSomething isn't workingSomething isn't working