Use typing_extensions.Self in the stdlib (#9694)

This commit is contained in:
Alex Waygood
2023-02-09 09:12:13 +00:00
committed by GitHub
parent 10086c06a1
commit 9ed39d8796
98 changed files with 627 additions and 654 deletions

View File

@@ -1,9 +1,9 @@
import ssl
import sys
from _typeshed import Self, StrPath
from _typeshed import StrPath
from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Sequence
from typing import Any
from typing_extensions import SupportsIndex, TypeAlias
from typing_extensions import Self, SupportsIndex, TypeAlias
from . import events, protocols, transports
from .base_events import Server
@@ -166,5 +166,5 @@ class StreamReader(AsyncIterator[bytes]):
async def readuntil(self, separator: bytes | bytearray | memoryview = b"\n") -> bytes: ...
async def read(self, n: int = -1) -> bytes: ...
async def readexactly(self, n: int) -> bytes: ...
def __aiter__(self: Self) -> Self: ...
def __aiter__(self) -> Self: ...
async def __anext__(self) -> bytes: ...