Improve various signatures that shouldn't be async def, but currently are (#7491)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
Alex Waygood
2022-03-19 03:54:39 +00:00
committed by GitHub
parent 37a981920f
commit 5c44ae4f8c
10 changed files with 44 additions and 17 deletions

View File

@@ -7,7 +7,7 @@ import ctypes
import mmap
import sys
from os import PathLike
from typing import AbstractSet, Any, Container, Generic, Iterable, Protocol, TypeVar
from typing import AbstractSet, Any, Awaitable, Container, Generic, Iterable, Protocol, TypeVar
from typing_extensions import Final, Literal, final
_KT = TypeVar("_KT")
@@ -33,7 +33,7 @@ class SupportsNext(Protocol[_T_co]):
# stable
class SupportsAnext(Protocol[_T_co]):
async def __anext__(self) -> _T_co: ...
def __anext__(self) -> Awaitable[_T_co]: ...
# Comparison protocols