Describe the bug
The following code can not be parsed/formatted by black:
class name_5[name_4: lambda: something]:
pass
❯ black -t py312 bug.py
error: cannot format bug.py: Cannot parse for target version Python 3.12: 1:21: class name_5[name_4: lambda: something]:
Oh no! 💥 💔 💥
1 file failed to reformat.
but it can be parsed by cpython.
python3.12 scripts/min_code.py
Environment
- Black's version: current main (00c0d6d)
- OS and Python version: Linux/Python 3.12
Additional context
The bug was found by pysource-codegen (see #3908)
Describe the bug
The following code can not be parsed/formatted by black:
but it can be parsed by cpython.
Environment
Additional context
The bug was found by pysource-codegen (see #3908)