mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Convert typing.ContextManager.exit to use dunder parameter names (#2980)
This commit is contained in:
committed by
Jelle Zijlstra
parent
50d98acc76
commit
2cf4af784c
@@ -237,9 +237,9 @@ class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]):
|
||||
@runtime
|
||||
class ContextManager(Protocol[_T_co]):
|
||||
def __enter__(self) -> _T_co: ...
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]],
|
||||
exc_value: Optional[BaseException],
|
||||
traceback: Optional[TracebackType]) -> Optional[bool]: ...
|
||||
def __exit__(self, __exc_type: Optional[Type[BaseException]],
|
||||
__exc_value: Optional[BaseException],
|
||||
__traceback: Optional[TracebackType]) -> Optional[bool]: ...
|
||||
|
||||
class Mapping(Iterable[_KT], Container[_KT], Generic[_KT, _VT_co]):
|
||||
# TODO: We wish the key type could also be covariant, but that doesn't work,
|
||||
|
||||
@@ -353,9 +353,9 @@ class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]):
|
||||
@runtime
|
||||
class ContextManager(Protocol[_T_co]):
|
||||
def __enter__(self) -> _T_co: ...
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]],
|
||||
exc_value: Optional[BaseException],
|
||||
traceback: Optional[TracebackType]) -> Optional[bool]: ...
|
||||
def __exit__(self, __exc_type: Optional[Type[BaseException]],
|
||||
__exc_value: Optional[BaseException],
|
||||
__traceback: Optional[TracebackType]) -> Optional[bool]: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
@runtime
|
||||
|
||||
Reference in New Issue
Block a user