mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 14:46:55 +08:00
Added missing attributes of typing.Generator and typing.AsyncGenerator (#886)
This commit is contained in:
committed by
Guido van Rossum
parent
72d275bbf5
commit
8b26422b95
@@ -1,8 +1,9 @@
|
||||
# Stubs for typing (Python 2.7)
|
||||
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from types import CodeType, FrameType
|
||||
|
||||
# Definitions of special type checking related constructs. Their definition
|
||||
# Definitions of special type checking related constructs. Their definitions
|
||||
# are not used, so their value does not matter.
|
||||
|
||||
overload = object()
|
||||
@@ -109,6 +110,10 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
@abstractmethod
|
||||
def close(self) -> None: ...
|
||||
|
||||
gi_code = ... # type: CodeType
|
||||
gi_frame = ... # type: FrameType
|
||||
gi_running = ... # type: bool
|
||||
|
||||
class Container(Generic[_T_co]):
|
||||
@abstractmethod
|
||||
def __contains__(self, x: object) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user