Skip to content

Commit 2f5d978

Browse files
authored
Very minor changes to AsyncGenerator (#356)
1 parent 56abd8f commit 2f5d978

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/test_typing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,7 @@ def athrow(self, typ, val=None, tb=None):
18441844
self.assertIsInstance(instance, collections.AsyncGenerator)
18451845
self.assertIsInstance(instance, collections.AsyncIterable)
18461846
self.assertNotIsInstance(type(g), G)
1847+
self.assertNotIsInstance(g, G)
18471848

18481849
def test_subclassing_subclasshook(self):
18491850

src/typing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,10 +1902,8 @@ def __new__(cls, *args, **kwds):
19021902
return _generic_new(_G_base, cls, *args, **kwds)
19031903

19041904
if hasattr(collections_abc, 'AsyncGenerator'):
1905-
_AG_base = collections_abc.AsyncGenerator
1906-
19071905
class AsyncGenerator(AsyncIterator[T_co], Generic[T_co, T_contra],
1908-
extra=_AG_base):
1906+
extra=collections_abc.AsyncGenerator):
19091907
__slots__ = ()
19101908

19111909
__all__.append('AsyncGenerator')

0 commit comments

Comments
 (0)