Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 25, 2024
1 parent 55492d5 commit 53d3b8e
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions src/exceptiongroup/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,18 @@ def exceptions(
@overload
def subgroup(
self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
) -> ExceptionGroup[_ExceptionT] | None:
...
) -> ExceptionGroup[_ExceptionT] | None: ...

@overload
def subgroup(
self, __condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...]
) -> BaseExceptionGroup[_BaseExceptionT] | None:
...
) -> BaseExceptionGroup[_BaseExceptionT] | None: ...

@overload
def subgroup(
self,
__condition: Callable[[_BaseExceptionT_co | _BaseExceptionGroupSelf], bool],
) -> BaseExceptionGroup[_BaseExceptionT_co] | None:
...
) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...

def subgroup(
self,
Expand Down Expand Up @@ -176,17 +173,15 @@ def split(
) -> tuple[
ExceptionGroup[_ExceptionT] | None,
BaseExceptionGroup[_BaseExceptionT_co] | None,
]:
...
]: ...

@overload
def split(
self, __condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...]
) -> tuple[
BaseExceptionGroup[_BaseExceptionT] | None,
BaseExceptionGroup[_BaseExceptionT_co] | None,
]:
...
]: ...

@overload
def split(
Expand All @@ -195,8 +190,7 @@ def split(
) -> tuple[
BaseExceptionGroup[_BaseExceptionT_co] | None,
BaseExceptionGroup[_BaseExceptionT_co] | None,
]:
...
]: ...

def split(
self,
Expand Down Expand Up @@ -249,14 +243,12 @@ def split(
return matching_group, nonmatching_group

@overload
def derive(self, __excs: Sequence[_ExceptionT]) -> ExceptionGroup[_ExceptionT]:
...
def derive(self, __excs: Sequence[_ExceptionT]) -> ExceptionGroup[_ExceptionT]: ...

@overload
def derive(
self, __excs: Sequence[_BaseExceptionT]
) -> BaseExceptionGroup[_BaseExceptionT]:
...
) -> BaseExceptionGroup[_BaseExceptionT]: ...

def derive(
self, __excs: Sequence[_BaseExceptionT]
Expand All @@ -282,20 +274,17 @@ def __new__(
@property
def exceptions(
self,
) -> tuple[_ExceptionT_co | ExceptionGroup[_ExceptionT_co], ...]:
...
) -> tuple[_ExceptionT_co | ExceptionGroup[_ExceptionT_co], ...]: ...

@overload # type: ignore[override]
def subgroup(
self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
) -> ExceptionGroup[_ExceptionT] | None:
...
) -> ExceptionGroup[_ExceptionT] | None: ...

@overload
def subgroup(
self, __condition: Callable[[_ExceptionT_co | _ExceptionGroupSelf], bool]
) -> ExceptionGroup[_ExceptionT_co] | None:
...
) -> ExceptionGroup[_ExceptionT_co] | None: ...

def subgroup(
self,
Expand All @@ -310,16 +299,14 @@ def split(
self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
) -> tuple[
ExceptionGroup[_ExceptionT] | None, ExceptionGroup[_ExceptionT_co] | None
]:
...
]: ...

@overload
def split(
self, __condition: Callable[[_ExceptionT_co | _ExceptionGroupSelf], bool]
) -> tuple[
ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None
]:
...
]: ...

def split(
self: _ExceptionGroupSelf,
Expand Down

0 comments on commit 53d3b8e

Please sign in to comment.