black/tests/data/pep_572_do_not_remove_parens.py
Richard Si b55ea63ff4
Stop stripping parens in even more illegal spots (#2148)
We're only fixing them so fuzzers don't yell at us when we break "valid"
code. I mean "valid" because some of the examples aren't even accepted by
Python.
2021-04-26 22:26:43 +02:00

22 lines
460 B
Python

# Most of the following examples are really dumb, some of them aren't even accepted by Python,
# we're fixing them only so fuzzers (which follow the grammar which actually allows these
# examples matter of fact!) don't yell at us :p
del (a := [1])
try:
pass
except (a := 1) as (b := why_does_this_exist):
pass
for (z := 124) in (x := -124):
pass
with (y := [3, 2, 1]) as (funfunfun := indeed):
pass
@(please := stop)
def sigh():
pass