From 9e5816a5390302933b2444fcff345798e06fa784 Mon Sep 17 00:00:00 2001 From: Frazer McLean Date: Thu, 17 Jan 2019 20:16:38 +0100 Subject: [PATCH] Fix six.raise_from value type (#2746) Fixes #2742 --- third_party/2/six/__init__.pyi | 2 +- third_party/3/six/__init__.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/2/six/__init__.pyi b/third_party/2/six/__init__.pyi index c4bff59e5..6665f4e9e 100644 --- a/third_party/2/six/__init__.pyi +++ b/third_party/2/six/__init__.pyi @@ -84,7 +84,7 @@ def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[Any def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ... def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ... -def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ... +def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ... print_ = print diff --git a/third_party/3/six/__init__.pyi b/third_party/3/six/__init__.pyi index a500d42e9..16a4b1517 100644 --- a/third_party/3/six/__init__.pyi +++ b/third_party/3/six/__init__.pyi @@ -96,7 +96,7 @@ def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[Any exec_ = exec def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ... -def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ... +def raise_from(value: Union[BaseException, Type[BaseException]], from_value: Optional[BaseException]) -> NoReturn: ... print_ = print