mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
add __{cause,context,traceback}__ to BaseException, per PEP 3134 (#369)
This commit is contained in:
committed by
Matthias Kramm
parent
f47ff0b966
commit
534837e1ee
@@ -7,6 +7,7 @@ from typing import (
|
||||
SupportsAbs, SupportsRound, IO, Union, ItemsView, KeysView, ValuesView, ByteString
|
||||
)
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from types import TracebackType
|
||||
|
||||
# Note that names imported above are not automatically made visible via the
|
||||
# implicit builtins import.
|
||||
@@ -751,6 +752,9 @@ Ellipsis = ... # type: ellipsis
|
||||
|
||||
class BaseException:
|
||||
args = ... # type: Any
|
||||
__cause__ = ... # type: BaseException
|
||||
__context__ = ... # type: BaseException
|
||||
__traceback__ = ... # type: TracebackType
|
||||
def __init__(self, *args: Any) -> None: ...
|
||||
def with_traceback(self, tb: Any) -> BaseException: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user