mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
fix unprecise type in sys.exc_info in py2 (#466)
This commit is contained in:
committed by
Guido van Rossum
parent
0edb87fc6b
commit
04d799f656
@@ -1,7 +1,8 @@
|
||||
"""Stubs for the 'sys' module."""
|
||||
|
||||
from typing import (
|
||||
IO, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable, overload
|
||||
IO, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional, Callable,
|
||||
overload, Type,
|
||||
)
|
||||
from types import FrameType, ModuleType, TracebackType, ClassType
|
||||
|
||||
@@ -112,7 +113,7 @@ def __excepthook__(type_: type, value: BaseException, traceback: TracebackType)
|
||||
def exc_clear() -> None:
|
||||
raise DeprecationWarning()
|
||||
# TODO should be a union of tuple, see mypy#1178
|
||||
def exc_info() -> Tuple[Optional[type],
|
||||
def exc_info() -> Tuple[Optional[Type[BaseException]],
|
||||
Optional[BaseException],
|
||||
Optional[TracebackType]]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user