From 2cf4af784c54b4646f758c1035ef5cc33f2229c5 Mon Sep 17 00:00:00 2001 From: Mark Mendoza Date: Wed, 15 May 2019 13:30:20 -0700 Subject: [PATCH] Convert typing.ContextManager.exit to use dunder parameter names (#2980) --- stdlib/2/typing.pyi | 6 +++--- stdlib/3/typing.pyi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index d95f7b26c..6c159b963 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -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, diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 04579dd68..c99c1f99a 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -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