-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathexception.pyi
More file actions
30 lines (26 loc) · 832 Bytes
/
exception.pyi
File metadata and controls
30 lines (26 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import sys
from typing import Generic, TypeVar
T = TypeVar('T')
class object:
def __init__(self): pass
class type: pass
class tuple(Generic[T]):
def __ge__(self, other: object) -> bool: ...
class list: pass
class dict: pass
class function: pass
class int: pass
class float: pass
class str: pass
class bool: pass
class ellipsis: pass
class BaseException:
def __init__(self, *args: object) -> None: ...
class Exception(BaseException): pass
class RuntimeError(Exception): pass
class NotImplementedError(RuntimeError): pass
if sys.version_info >= (3, 11):
_BT_co = TypeVar("_BT_co", bound=BaseException, covariant=True)
_T_co = TypeVar("_T_co", bound=Exception, covariant=True)
class BaseExceptionGroup(BaseException, Generic[_BT_co]): ...
class ExceptionGroup(BaseExceptionGroup[_T_co], Exception): ...