mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
widen _SupportsAclose (#5708)
see https://github.com/python-trio/trio-typing/issues/31#issuecomment-867534826
This commit is contained in:
@@ -48,7 +48,7 @@ class closing(ContextManager[_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(AsyncContextManager[_SupportsAcloseT]):
|
||||
def __init__(self, thing: _SupportsAcloseT) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user