Skip to content

Commit

Permalink
Remove invalid Python syntax from formatter tests
Browse files Browse the repository at this point in the history
With the parser becoming a bit more strict, it discovered some invalid
syntax in one of the formatter tests. In particular, `yield a = 1`:

    >>> (yield a, b) = (1, 2)
      File "<input>", line 1
        (yield a, b) = (1, 2)
         ^^^^^^^^^^
    SyntaxError: cannot assign to yield expression here. Maybe you meant '==' instead of '='?

We just remove that bit from the `yield` test.
  • Loading branch information
BurntSushi committed Nov 6, 2023
1 parent 8e583fc commit 9142dae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def foo():
pass


(yield a, b) = (1, 2)

# some comment
for e in l : yield e # some comment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def foo():
pass
(yield a, b) = (1, 2)
# some comment
for e in l : yield e # some comment
Expand Down Expand Up @@ -151,8 +149,6 @@ def foo():
# comment
pass
(yield a, b) = (1, 2)
# some comment
for e in l:
yield e # some comment
Expand Down

0 comments on commit 9142dae

Please sign in to comment.