mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-07 12:44:33 +08:00
Fix return annotations of several methods that return self at runtime (#7070)
This commit is contained in:
1 parent
749d3db815
commit
33ecb68603
8 files changed
+19
-15
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from _typeshed import Self, StrPath
|
||||
from typing import Any, AsyncIterator, Awaitable, Callable, Iterable, Optional
|
||||
|
||||
from . import events, protocols, transports
|
||||
@@ -117,7 +117,7 @@ class StreamWriter:
|
||||
def get_extra_info(self, name: str, default: Any = ...) -> Any: ...
|
||||
async def drain(self) -> None: ...
|
||||
|
||||
class StreamReader:
|
||||
class StreamReader(AsyncIterator[bytes]):
|
||||
def __init__(self, limit: int = ..., loop: events.AbstractEventLoop | None = ...) -> None: ...
|
||||
def exception(self) -> Exception: ...
|
||||
def set_exception(self, exc: Exception) -> None: ...
|
||||
@@ -129,5 +129,5 @@ class StreamReader:
|
||||
async def readuntil(self, separator: bytes = ...) -> bytes: ...
|
||||
async def read(self, n: int = ...) -> bytes: ...
|
||||
async def readexactly(self, n: int) -> bytes: ...
|
||||
def __aiter__(self) -> AsyncIterator[bytes]: ...
|
||||
def __aiter__(self: Self) -> Self: ...
|
||||
async def __anext__(self) -> bytes: ...
|
||||
Reference in new issue
Block a user