diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index bf7fa6fe..08fe4867 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -27,4 +27,4 @@ jobs: pre-commit install - name: Run pre-commit - run: pre-commit run --all-files \ No newline at end of file + run: pre-commit run --all-files diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index c06df2d1..f69e813b 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -47,4 +47,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: Pytest-test-report-${{ matrix.python-version }} - path: report \ No newline at end of file + path: report diff --git a/.gitignore b/.gitignore index 8b89813b..0590cd9d 100644 --- a/.gitignore +++ b/.gitignore @@ -179,4 +179,4 @@ config/ .vscode/ # macos finder -.DS_Store \ No newline at end of file +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7f117c7..48feefd0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,5 @@ fail_fast: true repos: - - repo: https://github.com/timothycrosley/isort - rev: 5.13.2 - hooks: - - id: isort - repo: https://github.com/psf/black rev: 24.4.2 diff --git a/README_DEV.md b/README_DEV.md index 39c4eda9..1efd344a 100644 --- a/README_DEV.md +++ b/README_DEV.md @@ -20,4 +20,4 @@ pre-commit install ## 其他提示 -- 请勿在大小写不敏感的文件系统或操作系统中开发,否则可能会导致文件名大小写问题(例如Windows, APFS(不区分大小写)等) \ No newline at end of file +- 请勿在大小写不敏感的文件系统或操作系统中开发,否则可能会导致文件名大小写问题(例如Windows, APFS(不区分大小写)等) diff --git a/nonebot_plugin_marshoai/azure.py b/nonebot_plugin_marshoai/azure.py index b21744c3..957b698a 100644 --- a/nonebot_plugin_marshoai/azure.py +++ b/nonebot_plugin_marshoai/azure.py @@ -5,12 +5,16 @@ from typing import Optional import nonebot_plugin_localstore as store from arclet.alconna import Alconna, AllParam, Args -from azure.ai.inference.models import (AssistantMessage, - ChatCompletionsToolCall, - CompletionsFinishReason, - ImageContentItem, ImageUrl, - TextContentItem, ToolMessage, - UserMessage) +from azure.ai.inference.models import ( + AssistantMessage, + ChatCompletionsToolCall, + CompletionsFinishReason, + ImageContentItem, + ImageUrl, + TextContentItem, + ToolMessage, + UserMessage, +) from azure.core.credentials import AzureKeyCredential from nonebot import get_driver, logger, on_command, on_message from nonebot.adapters import Event, Message diff --git a/nonebot_plugin_marshoai/models.py b/nonebot_plugin_marshoai/models.py index e788e0c8..160b743d 100644 --- a/nonebot_plugin_marshoai/models.py +++ b/nonebot_plugin_marshoai/models.py @@ -2,6 +2,7 @@ import importlib import json import os import sys + # import importlib.util import traceback diff --git a/nonebot_plugin_marshoai/util.py b/nonebot_plugin_marshoai/util.py index 7c7309e2..c1b89778 100644 --- a/nonebot_plugin_marshoai/util.py +++ b/nonebot_plugin_marshoai/util.py @@ -7,6 +7,7 @@ from typing import Any, Optional import httpx import nonebot_plugin_localstore as store + # from zhDateTime import DateTime from azure.ai.inference.aio import ChatCompletionsClient from azure.ai.inference.models import SystemMessage diff --git a/nonebot_plugin_marshoai/util_hunyuan.py b/nonebot_plugin_marshoai/util_hunyuan.py index 43e1b86a..4d1fca39 100644 --- a/nonebot_plugin_marshoai/util_hunyuan.py +++ b/nonebot_plugin_marshoai/util_hunyuan.py @@ -2,12 +2,11 @@ import json import types from tencentcloud.common import credential # type: ignore -from tencentcloud.common.exception.tencent_cloud_sdk_exception import \ - TencentCloudSDKException # type: ignore -from tencentcloud.common.profile.client_profile import \ - ClientProfile # type: ignore -from tencentcloud.common.profile.http_profile import \ - HttpProfile # type: ignore +from tencentcloud.common.exception.tencent_cloud_sdk_exception import ( + TencentCloudSDKException, +) # type: ignore +from tencentcloud.common.profile.client_profile import ClientProfile # type: ignore +from tencentcloud.common.profile.http_profile import HttpProfile # type: ignore from tencentcloud.hunyuan.v20230901 import hunyuan_client # type: ignore from tencentcloud.hunyuan.v20230901 import models # type: ignore