Fix type for six.reraise to make it match sys.exc_info()

The docs for six say the simple case is `reraise(*sys.exc_info())`
This commit is contained in:
David Euresti
2016-12-26 00:38:40 -08:00
committed by Łukasz Langa
parent 37dff4d8bc
commit 8a8680371a
2 changed files with 4 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import print_function
import types
from typing import (
Any, AnyStr, Callable, Dict, Iterable, Mapping, Optional,
Pattern, Tuple, TypeVar, Union, overload, ValuesView, KeysView, ItemsView
Pattern, Tuple, Type, TypeVar, Union, overload, ValuesView, KeysView, ItemsView
)
import typing
import unittest
@@ -79,7 +79,7 @@ def assertRaisesRegex(self: unittest.TestCase, msg: str = ...) -> Any: ...
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: str = ...) -> None: ...
def reraise(tp: type, value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> None: ...
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> None: ...
def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ...
def raise_from(value: BaseException, from_value: BaseException) -> None: ...