Use typing_extensions.Self instead of _typeshed.Self (#9702)

This commit is contained in:
Alex Waygood
2023-02-15 11:32:43 +01:00
committed by GitHub
parent 8cd6d81f15
commit 7180d0223b
140 changed files with 597 additions and 610 deletions

View File

@@ -1,7 +1,7 @@
from _typeshed import Self
from collections.abc import Coroutine, Generator, Iterator
from types import CodeType, FrameType, TracebackType, coroutine
from typing import Any, Generic, TypeVar
from typing_extensions import Self
_T = TypeVar("_T")
_T_co = TypeVar("_T_co", covariant=True)
@@ -10,7 +10,7 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
class AsyncBase(Generic[_T]):
def __init__(self, file: str, loop: Any, executor: Any) -> None: ...
def __aiter__(self: Self) -> Self: ...
def __aiter__(self) -> Self: ...
async def __anext__(self) -> _T: ...
class AiofilesContextManager(Generic[_T_co, _T_contra, _V_co]):