Mark __next__, __iter__, and close in Generator as concrete (#4385)

Closes #4384
This commit is contained in:
Áron Ricardo Perez-Lopez
2020-08-04 06:16:35 -04:00
committed by GitHub
parent cd132ff161
commit a770110497

View File

@@ -170,7 +170,6 @@ class Iterator(Iterable[_T_co], Protocol[_T_co]):
def __iter__(self) -> Iterator[_T_co]: ...
class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@abstractmethod
def __next__(self) -> _T_co: ...
@abstractmethod
def send(self, __value: _T_contra) -> _T_co: ...
@@ -182,9 +181,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@overload
@abstractmethod
def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> _T_co: ...
@abstractmethod
def close(self) -> None: ...
@abstractmethod
def __iter__(self) -> Generator[_T_co, _T_contra, _V_co]: ...
@property
def gi_code(self) -> CodeType: ...