-
Notifications
You must be signed in to change notification settings - Fork 950
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
579 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
def f(): | ||
for x in y: | ||
yield x | ||
|
||
|
||
def g(): | ||
for x, y in z: | ||
yield (x, y) | ||
|
||
|
||
def h(): | ||
for x in [1, 2, 3]: | ||
yield x | ||
|
||
|
||
def i(): | ||
for x in {x for x in y}: | ||
yield x | ||
|
||
|
||
def j(): | ||
for x in (1, 2, 3): | ||
yield x | ||
|
||
|
||
def k(): | ||
for x, y in {3: "x", 6: "y"}: | ||
yield x, y | ||
|
||
|
||
def f(): # Comment one\n' | ||
# Comment two\n' | ||
for x, y in { # Comment three\n' | ||
3: "x", # Comment four\n' | ||
# Comment five\n' | ||
6: "y", # Comment six\n' | ||
}: # Comment seven\n' | ||
# Comment eight\n' | ||
yield x, y # Comment nine\n' | ||
# Comment ten', | ||
|
||
|
||
def f(): | ||
for x, y in [{3: (3, [44, "long ss"]), 6: "y"}]: | ||
yield x, y | ||
|
||
|
||
def f(): | ||
for x, y in z(): | ||
yield x, y | ||
|
||
def f(): | ||
def func(): | ||
# This comment is preserved\n' | ||
for x, y in z(): # Comment one\n' | ||
# Comment two\n' | ||
yield x, y # Comment three\n' | ||
# Comment four\n' | ||
# Comment\n' | ||
def g(): | ||
print(3) | ||
|
||
|
||
def f(): | ||
for x in y: | ||
yield x | ||
for z in x: | ||
yield z | ||
|
||
|
||
def f(): | ||
for x, y in z(): | ||
yield x, y | ||
x = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# These should NOT change | ||
def f(): | ||
for x in z: | ||
yield | ||
|
||
|
||
def f(): | ||
for x in z: | ||
yield y | ||
|
||
|
||
def f(): | ||
for x, y in z: | ||
yield x | ||
|
||
|
||
def f(): | ||
for x, y in z: | ||
yield y | ||
|
||
|
||
def f(): | ||
for a, b in z: | ||
yield x, y | ||
|
||
|
||
def f(): | ||
for x, y in z: | ||
yield y, x | ||
|
||
|
||
def f(): | ||
for x, y, c in z: | ||
yield x, y | ||
|
||
|
||
def f(): | ||
for x in z: | ||
x = 22 | ||
yield x | ||
|
||
|
||
def f(): | ||
for x in z: | ||
yield x | ||
else: | ||
print("boom!") | ||
|
||
|
||
def f(): | ||
for x in range(5): | ||
yield x | ||
print(x) | ||
|
||
|
||
def f(): | ||
def g(): | ||
print(x) | ||
|
||
for x in range(5): | ||
yield x | ||
g() | ||
|
||
|
||
def f(): | ||
def g(): | ||
def h(): | ||
print(x) | ||
|
||
return h | ||
|
||
for x in range(5): | ||
yield x | ||
g()() | ||
|
||
|
||
def f(x): | ||
for x in y: | ||
yield x | ||
del x | ||
|
||
|
||
async def f(): | ||
for x in y: | ||
yield x | ||
|
||
|
||
def f(): | ||
x = 1 | ||
print(x) | ||
for x in y: | ||
yield x | ||
|
||
|
||
def f(): | ||
for x in y: | ||
yield x | ||
print(x) | ||
|
||
|
||
def f(): | ||
for x in y: | ||
yield x | ||
z = lambda: x | ||
|
||
|
||
def f(): | ||
for x in y: | ||
yield x | ||
|
||
class C: | ||
def __init__(self): | ||
print(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -969,6 +969,7 @@ | |
"UP025", | ||
"UP026", | ||
"UP027", | ||
"UP028", | ||
"W", | ||
"W2", | ||
"W29", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.