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

@@ -154,7 +154,7 @@ class closing(AbstractContextManager[_SupportsCloseT]):
if sys.version_info >= (3, 10):
class _SupportsAclose(Protocol):
async def aclose(self) -> object: ...
def aclose(self) -> Awaitable[object]: ...
_SupportsAcloseT = TypeVar("_SupportsAcloseT", bound=_SupportsAclose)
class aclosing(AbstractAsyncContextManager[_SupportsAcloseT]):