mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Mark __next__, __iter__, and close in Generator as concrete (#4385)
Closes #4384
This commit is contained in:
committed by
GitHub
parent
cd132ff161
commit
a770110497
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user