mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Fix return annotations of several methods that return self at runtime (#7070)
This commit is contained in:
@@ -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