From 0217ce2c5b2bb8a80d44483c7e1aaa1e77eb3c0c Mon Sep 17 00:00:00 2001 From: Anentropic Date: Wed, 1 Nov 2017 16:23:14 +0000 Subject: [PATCH 1/2] BaseException.__init__ accepts **kwargs --- stdlib/2/__builtin__.pyi | 2 +- stdlib/3/builtins.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 0b8dfb1b3b19..f2c9c20ee947 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -873,7 +873,7 @@ class memoryview(Sized, Container[bytes]): class BaseException(object): args = ... # type: Tuple[Any, ...] message = ... # type: str - def __init__(self, *args: Any) -> None: ... + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class GeneratorExit(BaseException): ... class KeyboardInterrupt(BaseException): ... class SystemExit(BaseException): diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 7780fccc8113..91d4fe6a4a71 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -902,7 +902,7 @@ class BaseException: __cause__ = ... # type: BaseException __context__ = ... # type: BaseException __traceback__ = ... # type: TracebackType - def __init__(self, *args: object) -> None: ... + def __init__(self, *args: object, **kwargs: object) -> None: ... def with_traceback(self, tb: Any) -> BaseException: ... class GeneratorExit(BaseException): ... From 6646fd0478cfa61c901e6c6326e94036b7e216fe Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 3 Nov 2017 22:49:14 -0700 Subject: [PATCH 2/2] use "object" instead of "Any" also in Python 2 --- stdlib/2/__builtin__.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index f2c9c20ee947..47edbd8e9b24 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -873,7 +873,7 @@ class memoryview(Sized, Container[bytes]): class BaseException(object): args = ... # type: Tuple[Any, ...] message = ... # type: str - def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __init__(self, *args: object, **kwargs: object) -> None: ... class GeneratorExit(BaseException): ... class KeyboardInterrupt(BaseException): ... class SystemExit(BaseException):