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
This commit is contained in:
Alex Grönholm
2017-08-27 00:43:43 +03:00
committed by Jelle Zijlstra
parent 875bfe4c2a
commit 023afbc098
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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