🎨 更新 .pre-commit-config.yaml,启用额外的钩子;优化代码格式,确保一致性;更新 pyproject.toml,添加新作者信息

This commit is contained in:
远野千束(神羽) 2024-12-13 18:59:28 +08:00
parent 849cc24968
commit 26009a3335
9 changed files with 21 additions and 20 deletions

View File

@ -27,4 +27,4 @@ jobs:
pre-commit install pre-commit install
- name: Run pre-commit - name: Run pre-commit
run: pre-commit run --all-files run: pre-commit run --all-files

View File

@ -47,4 +47,4 @@ jobs:
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Pytest-test-report-${{ matrix.python-version }} name: Pytest-test-report-${{ matrix.python-version }}
path: report path: report

2
.gitignore vendored
View File

@ -179,4 +179,4 @@ config/
.vscode/ .vscode/
# macos finder # macos finder
.DS_Store .DS_Store

View File

@ -1,9 +1,5 @@
fail_fast: true fail_fast: true
repos: repos:
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 24.4.2 rev: 24.4.2

View File

@ -20,4 +20,4 @@ pre-commit install
## 其他提示 ## 其他提示
- 请勿在大小写不敏感的文件系统或操作系统中开发,否则可能会导致文件名大小写问题(例如Windows APFS(不区分大小写)等) - 请勿在大小写不敏感的文件系统或操作系统中开发,否则可能会导致文件名大小写问题(例如Windows APFS(不区分大小写)等)

View File

@ -5,12 +5,16 @@ from typing import Optional
import nonebot_plugin_localstore as store import nonebot_plugin_localstore as store
from arclet.alconna import Alconna, AllParam, Args from arclet.alconna import Alconna, AllParam, Args
from azure.ai.inference.models import (AssistantMessage, from azure.ai.inference.models import (
ChatCompletionsToolCall, AssistantMessage,
CompletionsFinishReason, ChatCompletionsToolCall,
ImageContentItem, ImageUrl, CompletionsFinishReason,
TextContentItem, ToolMessage, ImageContentItem,
UserMessage) ImageUrl,
TextContentItem,
ToolMessage,
UserMessage,
)
from azure.core.credentials import AzureKeyCredential from azure.core.credentials import AzureKeyCredential
from nonebot import get_driver, logger, on_command, on_message from nonebot import get_driver, logger, on_command, on_message
from nonebot.adapters import Event, Message from nonebot.adapters import Event, Message

View File

@ -2,6 +2,7 @@ import importlib
import json import json
import os import os
import sys import sys
# import importlib.util # import importlib.util
import traceback import traceback

View File

@ -7,6 +7,7 @@ from typing import Any, Optional
import httpx import httpx
import nonebot_plugin_localstore as store import nonebot_plugin_localstore as store
# from zhDateTime import DateTime # from zhDateTime import DateTime
from azure.ai.inference.aio import ChatCompletionsClient from azure.ai.inference.aio import ChatCompletionsClient
from azure.ai.inference.models import SystemMessage from azure.ai.inference.models import SystemMessage

View File

@ -2,12 +2,11 @@ import json
import types import types
from tencentcloud.common import credential # type: ignore from tencentcloud.common import credential # type: ignore
from tencentcloud.common.exception.tencent_cloud_sdk_exception import \ from tencentcloud.common.exception.tencent_cloud_sdk_exception import (
TencentCloudSDKException # type: ignore TencentCloudSDKException,
from tencentcloud.common.profile.client_profile import \ ) # type: ignore
ClientProfile # type: ignore from tencentcloud.common.profile.client_profile import ClientProfile # type: ignore
from tencentcloud.common.profile.http_profile import \ from tencentcloud.common.profile.http_profile import HttpProfile # type: ignore
HttpProfile # type: ignore
from tencentcloud.hunyuan.v20230901 import hunyuan_client # type: ignore from tencentcloud.hunyuan.v20230901 import hunyuan_client # type: ignore
from tencentcloud.hunyuan.v20230901 import models # type: ignore from tencentcloud.hunyuan.v20230901 import models # type: ignore