Skip to content

Commit 7fbf9c7

Browse files
authored
Update exception group to match clinic generated arguments (#14088)
1 parent 0ba818e commit 7fbf9c7

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ asyncio.events._AbstractEventLoopPolicy
2626
asyncio.events._get_event_loop_policy
2727
asyncio.events._set_event_loop_policy
2828
asyncio.tasks.eager_task_factory
29-
builtins.BaseExceptionGroup.split
30-
builtins.BaseExceptionGroup.subgroup
31-
builtins.ExceptionGroup.split
32-
builtins.ExceptionGroup.subgroup
3329
builtins.bytearray.resize
3430
builtins.classmethod.__annotate__
3531
builtins.classmethod.__class_getitem__

stdlib/builtins.pyi

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,27 +2160,27 @@ if sys.version_info >= (3, 11):
21602160
def exceptions(self) -> tuple[_BaseExceptionT_co | BaseExceptionGroup[_BaseExceptionT_co], ...]: ...
21612161
@overload
21622162
def subgroup(
2163-
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
2163+
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
21642164
) -> ExceptionGroup[_ExceptionT] | None: ...
21652165
@overload
21662166
def subgroup(
2167-
self, condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
2167+
self, matcher_value: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
21682168
) -> BaseExceptionGroup[_BaseExceptionT] | None: ...
21692169
@overload
21702170
def subgroup(
2171-
self, condition: Callable[[_BaseExceptionT_co | Self], bool], /
2171+
self, matcher_value: Callable[[_BaseExceptionT_co | Self], bool], /
21722172
) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...
21732173
@overload
21742174
def split(
2175-
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
2175+
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
21762176
) -> tuple[ExceptionGroup[_ExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
21772177
@overload
21782178
def split(
2179-
self, condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
2179+
self, matcher_value: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...], /
21802180
) -> tuple[BaseExceptionGroup[_BaseExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
21812181
@overload
21822182
def split(
2183-
self, condition: Callable[[_BaseExceptionT_co | Self], bool], /
2183+
self, matcher_value: Callable[[_BaseExceptionT_co | Self], bool], /
21842184
) -> tuple[BaseExceptionGroup[_BaseExceptionT_co] | None, BaseExceptionGroup[_BaseExceptionT_co] | None]: ...
21852185
# In reality it is `NonEmptySequence`:
21862186
@overload
@@ -2197,17 +2197,19 @@ if sys.version_info >= (3, 11):
21972197
# We accept a narrower type, but that's OK.
21982198
@overload # type: ignore[override]
21992199
def subgroup(
2200-
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
2200+
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
22012201
) -> ExceptionGroup[_ExceptionT] | None: ...
22022202
@overload
2203-
def subgroup(self, condition: Callable[[_ExceptionT_co | Self], bool], /) -> ExceptionGroup[_ExceptionT_co] | None: ...
2203+
def subgroup(
2204+
self, matcher_value: Callable[[_ExceptionT_co | Self], bool], /
2205+
) -> ExceptionGroup[_ExceptionT_co] | None: ...
22042206
@overload # type: ignore[override]
22052207
def split(
2206-
self, condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
2208+
self, matcher_value: type[_ExceptionT] | tuple[type[_ExceptionT], ...], /
22072209
) -> tuple[ExceptionGroup[_ExceptionT] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
22082210
@overload
22092211
def split(
2210-
self, condition: Callable[[_ExceptionT_co | Self], bool], /
2212+
self, matcher_value: Callable[[_ExceptionT_co | Self], bool], /
22112213
) -> tuple[ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None]: ...
22122214

22132215
if sys.version_info >= (3, 13):

0 commit comments

Comments
 (0)