File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -856,19 +856,19 @@ generator function (https://peps.python.org/pep-0255/#specification-yield).
856
856
.. code-block :: python
857
857
858
858
from collections.abc import Generator, AsyncGenerator
859
-
859
+
860
860
async def async_gen () -> AsyncGenerator[int ]:
861
861
yield 1
862
-
862
+
863
863
def gen () -> Generator[int ]:
864
864
yield 1
865
-
865
+
866
866
async def async_func () -> int :
867
867
return 1
868
-
868
+
869
869
def func () -> int :
870
870
return 1
871
-
871
+
872
872
reveal_type(async_gen()) # AsyncGenerator[int, None]
873
873
reveal_type(gen()) # Generator[int, None, None]
874
874
reveal_type(async_func()) # Coroutine[Any, Any, int]
@@ -887,7 +887,7 @@ does not meet the expectation (generator type).
887
887
.. code-block :: python
888
888
889
889
from collections.abc import Generator
890
-
890
+
891
891
def gen () -> Generator[int ]:
892
892
... # error: Missing return statement
893
893
You can’t perform that action at this time.
0 commit comments