Skip to content

Commit b31122f

Browse files
authored
Fix Generators typeshed test (#10255)
typshed mistakenly set itertools.count as a function while it is actually a class. Meaning that it returns a class instance and then this clashes with the filter result.
1 parent 1567e36 commit b31122f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test-data/samples/generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def iter_primes() -> Iterator[int]:
88
# an iterator of all numbers between 2 and +infinity
9-
numbers = itertools.count(2)
9+
numbers: Iterator[int] = itertools.count(2)
1010

1111
# generate primes forever
1212
while True:

0 commit comments

Comments
 (0)