From 023afbc098e8df7d9bbc790a44d3f648a1729fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Sun, 27 Aug 2017 00:43:43 +0300 Subject: [PATCH] Fixed the signature of six.raise_from() (#1563) * Made the from_value argument optional in raise_from() * Fixed six.raise_from() from_value and return type for both py2 and py3 --- 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 c4c4723f8..bd8d97a37 100644 --- a/third_party/2/six/__init__.pyi +++ b/third_party/2/six/__init__.pyi @@ -82,7 +82,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: BaseException) -> None: ... +def raise_from(value: 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 80f6766b1..0631a6924 100644 --- a/third_party/3/six/__init__.pyi +++ b/third_party/3/six/__init__.pyi @@ -94,7 +94,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] = None) -> NoReturn: ... -def raise_from(value: BaseException, from_value: BaseException) -> None: ... +def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ... print_ = print