Skip to content

Commit a81c0d9

Browse files
Fix type of closing
Entering the `contextlib.closing` context manager returns its argument, not an instance of `contextlib.closing` itself.
1 parent eb3d1cd commit a81c0d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncstdlib/contextlib.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def contextmanager(
6060

6161
class closing(Generic[AClose]):
6262
def __init__(self, thing: AClose) -> None: ...
63-
async def __aenter__(self: Self) -> Self: ...
63+
async def __aenter__(self: Self) -> AClose: ...
6464
async def __aexit__(
6565
self,
6666
exc_type: type[BaseException] | None,

0 commit comments

Comments
 (0)