mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Update BaseException and BaseExceptionGroup for 3.13 (#12010)
This commit is contained in:
@@ -113,12 +113,6 @@ asyncio.unix_events.__all__
|
||||
bdb.Bdb.dispatch_opcode
|
||||
bdb.Bdb.set_stepinstr
|
||||
bdb.Bdb.user_opcode
|
||||
builtins.BaseException.add_note
|
||||
builtins.BaseException.with_traceback
|
||||
builtins.BaseExceptionGroup.__class_getitem__
|
||||
builtins.BaseExceptionGroup.derive
|
||||
builtins.BaseExceptionGroup.split
|
||||
builtins.BaseExceptionGroup.subgroup
|
||||
builtins.ExceptionGroup.split
|
||||
builtins.ExceptionGroup.subgroup
|
||||
builtins.IncompleteInputError
|
||||
|
||||
@@ -1844,11 +1844,11 @@ class BaseException:
|
||||
__traceback__: TracebackType | None
|
||||
def __init__(self, *args: object) -> None: ...
|
||||
def __setstate__(self, state: dict[str, Any] | None, /) -> None: ...
|
||||
def with_traceback(self, tb: TracebackType | None, /) -> Self: ...
|
||||
def with_traceback(self, object: TracebackType | None, /) -> Self: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
# only present after add_note() is called
|
||||
__notes__: list[str]
|
||||
def add_note(self, note: str, /) -> None: ...
|
||||
def add_note(self, object: str, /) -> None: ...
|
||||
|
||||
class GeneratorExit(BaseException): ...
|
||||
class KeyboardInterrupt(BaseException): ...
|
||||
@@ -2008,7 +2008,7 @@ if sys.version_info >= (3, 11):
|
||||
def exceptions(self) -> tuple[_BaseExceptionT_co | BaseExceptionGroup[_BaseExceptionT_co], ...]: ...
|
||||
@overload
|
||||
def subgroup(
|
||||
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
self, object: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> ExceptionGroup[_ExceptionT] | None: ...
|
||||
@overload
|
||||
def subgroup(
|
||||
@@ -2020,7 +2020,7 @@ if sys.version_info >= (3, 11):
|
||||
) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...
|
||||
@overload
|
||||
def split(
|
||||
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
self, object: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> tuple[ExceptionGroup[_ExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
|
||||
@overload
|
||||
def split(
|
||||
@@ -2032,10 +2032,10 @@ if sys.version_info >= (3, 11):
|
||||
) -> tuple[BaseExceptionGroup[_BaseExceptionT_co] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
|
||||
# In reality it is `NonEmptySequence`:
|
||||
@overload
|
||||
def derive(self, excs: Sequence[_ExceptionT], /) -> ExceptionGroup[_ExceptionT]: ...
|
||||
def derive(self, object: Sequence[_ExceptionT], /) -> ExceptionGroup[_ExceptionT]: ...
|
||||
@overload
|
||||
def derive(self, excs: Sequence[_BaseExceptionT], /) -> BaseExceptionGroup[_BaseExceptionT]: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
def __class_getitem__(cls, object: Any, /) -> GenericAlias: ...
|
||||
|
||||
class ExceptionGroup(BaseExceptionGroup[_ExceptionT_co], Exception):
|
||||
def __new__(cls, message: str, exceptions: Sequence[_ExceptionT_co], /) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user