mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
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:
committed by
Jelle Zijlstra
parent
875bfe4c2a
commit
023afbc098
2
third_party/2/six/__init__.pyi
vendored
2
third_party/2/six/__init__.pyi
vendored
@@ -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
|
||||
|
||||
|
||||
2
third_party/3/six/__init__.pyi
vendored
2
third_party/3/six/__init__.pyi
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user