Fix several methods that should be async def, but aren't (#7107)

This commit is contained in:
Alex Waygood
2022-02-02 14:18:14 +00:00
committed by GitHub
parent 1b99812621
commit 584336a41e
4 changed files with 18 additions and 18 deletions

View File

@@ -448,10 +448,10 @@ class ContextManager(Protocol[_T_co]):
@runtime_checkable
class AsyncContextManager(Protocol[_T_co]):
def __aenter__(self) -> Awaitable[_T_co]: ...
def __aexit__(
async def __aenter__(self) -> _T_co: ...
async def __aexit__(
self, __exc_type: Type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
) -> Awaitable[bool | None]: ...
) -> bool | None: ...
class Mapping(Collection[_KT], Generic[_KT, _VT_co]):
# TODO: We wish the key type could also be covariant, but that doesn't work,