mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🚨 auto fix by pre-commit hooks
This commit is contained in:
parent
c495c5d9b5
commit
b7864e535d
@ -18,7 +18,6 @@ LOG_COMMAND = "AutoUpdate"
|
||||
|
||||
|
||||
class UpdateManager:
|
||||
|
||||
@classmethod
|
||||
async def check_version(cls) -> str:
|
||||
"""检查真寻和资源的版本"""
|
||||
|
||||
@ -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]:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user