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]