fix: Missing typed variants of iterator and iterable (#4832)

This commit is contained in:
Sergei Izmailov
2023-09-13 04:48:27 +09:00
committed by GitHub
parent b4573674bc
commit 8c7b8dd0ae
3 changed files with 36 additions and 0 deletions

View File

@@ -926,6 +926,20 @@ def test_set_annotations(doc):
assert doc(m.annotate_set_str) == "annotate_set_str(arg0: set[str]) -> None"
def test_iterable_annotations(doc):
assert (
doc(m.annotate_iterable_str)
== "annotate_iterable_str(arg0: Iterable[str]) -> None"
)
def test_iterator_annotations(doc):
assert (
doc(m.annotate_iterator_int)
== "annotate_iterator_int(arg0: Iterator[int]) -> None"
)
def test_fn_annotations(doc):
assert (
doc(m.annotate_fn)