Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#113)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.4](astral-sh/ruff-pre-commit@v0.2.2...v0.3.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Mar 25, 2024
1 parent ee53e9f commit 8d2f627
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down
39 changes: 13 additions & 26 deletions src/exceptiongroup/_exceptions.py
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 8d2f627

Please sign in to comment.