Skip to content

Commit 610d47e

Browse files
committed
make AbstractContextManager.__enter__ abstract
1 parent c5e47fa commit 610d47e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/contextlib.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ _CM_EF = TypeVar("_CM_EF", bound=AbstractContextManager[Any, Any] | _ExitFunc)
4747
@runtime_checkable
4848
class AbstractContextManager(ABC, Protocol[_T_co, _ExitT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
4949
__slots__ = ()
50+
@abstractmethod
5051
def __enter__(self) -> _T_co: ...
5152
@abstractmethod
5253
def __exit__(
@@ -59,6 +60,7 @@ class AbstractContextManager(ABC, Protocol[_T_co, _ExitT_co]): # type: ignore[m
5960
@runtime_checkable
6061
class AbstractAsyncContextManager(ABC, Protocol[_T_co, _ExitT_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
6162
__slots__ = ()
63+
@abstractmethod
6264
async def __aenter__(self) -> _T_co: ...
6365
@abstractmethod
6466
async def __aexit__(

0 commit comments

Comments
 (0)