mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-25 02:04:04 +08:00
Update exception group to match clinic generated arguments (#14088)
This commit is contained in:
@@ -26,10 +26,6 @@ asyncio.events._AbstractEventLoopPolicy
|
||||
asyncio.events._get_event_loop_policy
|
||||
asyncio.events._set_event_loop_policy
|
||||
asyncio.tasks.eager_task_factory
|
||||
builtins.BaseExceptionGroup.split
|
||||
builtins.BaseExceptionGroup.subgroup
|
||||
builtins.ExceptionGroup.split
|
||||
builtins.ExceptionGroup.subgroup
|
||||
builtins.bytearray.resize
|
||||
builtins.classmethod.__annotate__
|
||||
builtins.classmethod.__class_getitem__
|
||||
|
||||
+12
-10
@@ -2160,27 +2160,27 @@ 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, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> ExceptionGroup[_ExceptionT] | None: ...
|
||||
@overload
|
||||
def subgroup(
|
||||
self, condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
|
||||
self, matcher_value: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
|
||||
) -> BaseExceptionGroup[_BaseExceptionT] | None: ...
|
||||
@overload
|
||||
def subgroup(
|
||||
self, condition: Callable[[_BaseExceptionT_co | Self], bool], /
|
||||
self, matcher_value: Callable[[_BaseExceptionT_co | Self], bool], /
|
||||
) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...
|
||||
@overload
|
||||
def split(
|
||||
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> tuple[ExceptionGroup[_ExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
|
||||
@overload
|
||||
def split(
|
||||
self, condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
|
||||
self, matcher_value: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
|
||||
) -> tuple[BaseExceptionGroup[_BaseExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
|
||||
@overload
|
||||
def split(
|
||||
self, condition: Callable[[_BaseExceptionT_co | Self], bool], /
|
||||
self, matcher_value: Callable[[_BaseExceptionT_co | Self], bool], /
|
||||
) -> tuple[BaseExceptionGroup[_BaseExceptionT_co] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
|
||||
# In reality it is `NonEmptySequence`:
|
||||
@overload
|
||||
@@ -2197,17 +2197,19 @@ if sys.version_info >= (3, 11):
|
||||
# We accept a narrower type, but that's OK.
|
||||
@overload # type: ignore[override]
|
||||
def subgroup(
|
||||
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> ExceptionGroup[_ExceptionT] | None: ...
|
||||
@overload
|
||||
def subgroup(self, condition: Callable[[_ExceptionT_co | Self], bool], /) -> ExceptionGroup[_ExceptionT_co] | None: ...
|
||||
def subgroup(
|
||||
self, matcher_value: Callable[[_ExceptionT_co | Self], bool], /
|
||||
) -> ExceptionGroup[_ExceptionT_co] | None: ...
|
||||
@overload # type: ignore[override]
|
||||
def split(
|
||||
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
|
||||
) -> tuple[ExceptionGroup[_ExceptionT] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
|
||||
@overload
|
||||
def split(
|
||||
self, condition: Callable[[_ExceptionT_co | Self], bool], /
|
||||
self, matcher_value: Callable[[_ExceptionT_co | Self], bool], /
|
||||
) -> tuple[ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
|
||||
Reference in New Issue
Block a user