From 8d2f6273ffe94b0f805f001d20f8e4fadae0b58f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:52:53 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#113) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.4](https://github.com/astral-sh/ruff-pre-commit/compare/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> --- .pre-commit-config.yaml | 2 +- src/exceptiongroup/_exceptions.py | 39 +++++++++++-------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2745ce4..56c72f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/src/exceptiongroup/_exceptions.py b/src/exceptiongroup/_exceptions.py index a45d25d..2513bd9 100644 --- a/src/exceptiongroup/_exceptions.py +++ b/src/exceptiongroup/_exceptions.py @@ -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, @@ -176,8 +173,7 @@ def split( ) -> tuple[ ExceptionGroup[_ExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None, - ]: - ... + ]: ... @overload def split( @@ -185,8 +181,7 @@ def split( ) -> tuple[ BaseExceptionGroup[_BaseExceptionT] | None, BaseExceptionGroup[_BaseExceptionT_co] | None, - ]: - ... + ]: ... @overload def split( @@ -195,8 +190,7 @@ def split( ) -> tuple[ BaseExceptionGroup[_BaseExceptionT_co] | None, BaseExceptionGroup[_BaseExceptionT_co] | None, - ]: - ... + ]: ... def split( self, @@ -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] @@ -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, @@ -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,