Update exception group to match clinic generated arguments (#14088)

This commit is contained in:
Max Muoto
2025-05-16 22:50:00 -05:00
committed by GitHub
parent 0ba818e2b5
commit 7fbf9c7927
2 changed files with 12 additions and 14 deletions
@@ -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
View File
@@ -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):