From 328ee58d909d15f09d2c89d7055aaebbd2a8cc83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:27:10 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20`pre-commit-ci`=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8D=87=E7=BA=A7=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ⬆️ `pre-commit-ci`自动升级 updates: - [github.com/pycqa/isort: 5.13.2 → 6.0.0](https://github.com/pycqa/isort/compare/5.13.2...6.0.0) - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) * 🚨 `pre-commit-ci`修复格式错误 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- gsuid_core/segment.py | 2 +- gsuid_core/utils/database/base_models.py | 2 +- gsuid_core/utils/image/image_tools.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e649b0..f087e18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,12 +8,12 @@ ci: autoupdate_commit_msg: "⬆️ `pre-commit-ci`自动升级" repos: - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.0 hooks: - id: isort - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black diff --git a/gsuid_core/segment.py b/gsuid_core/segment.py index ec79ea3..085a9ad 100644 --- a/gsuid_core/segment.py +++ b/gsuid_core/segment.py @@ -153,7 +153,7 @@ class MessageSegment: @staticmethod def node( - content_list: Union[List[Message], List[str], List[bytes]] + content_list: Union[List[Message], List[str], List[bytes]], ) -> Message: msg_list: List[Message] = [] for msg in content_list: diff --git a/gsuid_core/utils/database/base_models.py b/gsuid_core/utils/database/base_models.py index c3ded62..4dabfa4 100644 --- a/gsuid_core/utils/database/base_models.py +++ b/gsuid_core/utils/database/base_models.py @@ -87,7 +87,7 @@ except: # noqa: E722 def with_session( - func: Callable[Concatenate[Any, AsyncSession, P], Awaitable[R]] + func: Callable[Concatenate[Any, AsyncSession, P], Awaitable[R]], ) -> Callable[Concatenate[Any, P], Awaitable[R]]: @wraps(func) async def wrapper(self, *args: P.args, **kwargs: P.kwargs): diff --git a/gsuid_core/utils/image/image_tools.py b/gsuid_core/utils/image/image_tools.py index 4a1429f..e3c1157 100644 --- a/gsuid_core/utils/image/image_tools.py +++ b/gsuid_core/utils/image/image_tools.py @@ -490,7 +490,7 @@ class CustomizeImage: @staticmethod def get_char_high_color( - bg_color: Tuple[int, int, int] + bg_color: Tuple[int, int, int], ) -> Tuple[int, int, int]: r = 140 d = 20 @@ -505,7 +505,7 @@ class CustomizeImage: @staticmethod def get_bg_detail_color( - bg_color: Tuple[int, int, int] + bg_color: Tuple[int, int, int], ) -> Tuple[int, int, int]: r = 140 if max(*bg_color) > 255 - r: @@ -519,7 +519,7 @@ class CustomizeImage: @staticmethod def get_highlight_color( - color: Tuple[int, int, int] + color: Tuple[int, int, int], ) -> Tuple[int, int, int]: red_color = color[0] green_color = color[1]