Skip to content

Commit bd9550d

Browse files
authored
Migrate return type to annotations in missing-yield-doc example (#6400)
1 parent de029c7 commit bd9550d

File tree

1 file changed

+5
-2
lines changed
  • doc/data/messages/m/missing-yield-doc

1 file changed

+5
-2
lines changed

doc/data/messages/m/missing-yield-doc/good.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
def even_number_under(n: int):
1+
from typing import Iterator
2+
3+
4+
def even_number_under(n: int) -> Iterator[int]:
25
"""Prints even numbers smaller than n.
36
Args:
47
n: Upper limit of even numbers.
58
69
Yields:
7-
int: even numbers
10+
even numbers
811
"""
912
for i in range(n):
1013
if i % 2 == 1:

0 commit comments

Comments
 (0)