From b7864e535d58d32c8e3a837513c0a6e64c7082a0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 16:00:23 +0000 Subject: [PATCH] :rotating_light: auto fix by pre-commit hooks --- zhenxun/builtin_plugins/auto_update/_data_source.py | 1 - zhenxun/utils/repo_utils/file_manager.py | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zhenxun/builtin_plugins/auto_update/_data_source.py b/zhenxun/builtin_plugins/auto_update/_data_source.py index 7a35e090..9b41d596 100644 --- a/zhenxun/builtin_plugins/auto_update/_data_source.py +++ b/zhenxun/builtin_plugins/auto_update/_data_source.py @@ -18,7 +18,6 @@ LOG_COMMAND = "AutoUpdate" class UpdateManager: - @classmethod async def check_version(cls) -> str: """检查真寻和资源的版本""" diff --git a/zhenxun/utils/repo_utils/file_manager.py b/zhenxun/utils/repo_utils/file_manager.py index eafe9ae1..7c6d2a0c 100644 --- a/zhenxun/utils/repo_utils/file_manager.py +++ b/zhenxun/utils/repo_utils/file_manager.py @@ -634,6 +634,7 @@ class RepoFileManager: result.success = False result.error_message = str(e) return result + async def get_file_last_commit_date( self, repo_url: str, file_path: str ) -> str | None: @@ -652,8 +653,12 @@ class RepoFileManager: api_url = GIT_API_COMMIT_LIST_FORMAT.format( owner=repo_info.owner, repo=repo_info.repo ) - params = {"sha": repo_info.branch, "path": file_path, - "page": 1, "per_page": 1} + params = { + "sha": repo_info.branch, + "path": file_path, + "page": 1, + "per_page": 1, + } data = await AsyncHttpx.get_json(api_url, params=params) if data and isinstance(data, list) and data[0]: