Make args to AsyncContextManager.__aexit__ positional-only (#6172)

We already do this for `ContextManager.__exit__`. Should fix microsoft/pyright#2435.
This commit is contained in:
Jelle Zijlstra
2021-10-14 17:15:57 -07:00
committed by GitHub
parent c38c03bab8
commit 5f386b0575

View File

@@ -430,7 +430,7 @@ class ContextManager(Protocol[_T_co]):
class AsyncContextManager(Protocol[_T_co]):
def __aenter__(self) -> Awaitable[_T_co]: ...
def __aexit__(
self, exc_type: Type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
self, __exc_type: Type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
) -> Awaitable[bool | None]: ...
class Mapping(_Collection[_KT], Generic[_KT, _VT_co]):