⬆️ upgrade nonebot_plugin_saa

This commit is contained in:
felinae98 2023-11-21 21:04:47 +08:00
parent ae9ac9920c
commit badb26419e
9 changed files with 388 additions and 373 deletions

View File

@ -4,8 +4,8 @@ from fastapi.routing import APIRouter
from fastapi.param_functions import Depends from fastapi.param_functions import Depends
from fastapi.exceptions import HTTPException from fastapi.exceptions import HTTPException
from nonebot_plugin_saa import TargetQQGroup from nonebot_plugin_saa import TargetQQGroup
from nonebot_plugin_saa.auto_select_bot import get_bot
from fastapi.security.oauth2 import OAuth2PasswordBearer from fastapi.security.oauth2 import OAuth2PasswordBearer
from nonebot_plugin_saa.utils.auto_select_bot import get_bot
from ..types import WeightConfig from ..types import WeightConfig
from ..apis import check_sub_target from ..apis import check_sub_target

View File

@ -1,8 +1,8 @@
import datetime import datetime
from pathlib import Path from pathlib import Path
from nonebot_plugin_saa import PlatformTarget
from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.dialects.postgresql import JSONB
from nonebot_plugin_saa.utils import PlatformTarget
from nonebot_plugin_datastore import get_plugin_data from nonebot_plugin_datastore import get_plugin_data
from sqlalchemy.orm import Mapped, relationship, mapped_column from sqlalchemy.orm import Mapped, relationship, mapped_column
from sqlalchemy import JSON, String, ForeignKey, UniqueConstraint from sqlalchemy import JSON, String, ForeignKey, UniqueConstraint

View File

@ -1,7 +1,7 @@
from abc import ABC from abc import ABC
from pydantic import BaseModel from pydantic import BaseModel
from nonebot_plugin_saa.utils import AllSupportedPlatformTarget as UserInfo from nonebot_plugin_saa.registries import AllSupportedPlatformTarget as UserInfo
from ....types import Tag, Category from ....types import Tag, Category

View File

@ -5,7 +5,7 @@ from functools import partial
from nonebot.log import logger from nonebot.log import logger
from pydantic import BaseModel from pydantic import BaseModel
from nonebot_plugin_saa.utils import AllSupportedPlatformTarget from nonebot_plugin_saa.registries import AllSupportedPlatformTarget
from ..utils import NBESFParseErr from ..utils import NBESFParseErr
from ....types import Tag, Category from ....types import Tag, Category

View File

@ -4,7 +4,7 @@ from dataclasses import field, dataclass
from PIL import Image from PIL import Image
from nonebot.log import logger from nonebot.log import logger
import nonebot_plugin_saa as saa import nonebot_plugin_saa as saa
from nonebot_plugin_saa.utils import MessageSegmentFactory from nonebot_plugin_saa import MessageSegmentFactory
from ..utils import parse_text, http_client from ..utils import parse_text, http_client
from .abstract_post import BasePost, AbstractPost from .abstract_post import BasePost, AbstractPost

View File

@ -2,8 +2,8 @@ import asyncio
from collections import deque from collections import deque
from nonebot.log import logger from nonebot.log import logger
from nonebot_plugin_saa.auto_select_bot import refresh_bots
from nonebot.adapters.onebot.v11.exception import ActionFailed from nonebot.adapters.onebot.v11.exception import ActionFailed
from nonebot_plugin_saa.utils.auto_select_bot import refresh_bots
from nonebot_plugin_saa import MessageFactory, PlatformTarget, AggregatedMessageFactory from nonebot_plugin_saa import MessageFactory, PlatformTarget, AggregatedMessageFactory
from .plugin_config import plugin_config from .plugin_config import plugin_config

741
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ nonebot-adapter-onebot = "^2.0.0"
nonebot-plugin-htmlrender = ">=0.2.0" nonebot-plugin-htmlrender = ">=0.2.0"
nonebot-plugin-datastore = ">=0.6.2,<2.0.0" nonebot-plugin-datastore = ">=0.6.2,<2.0.0"
nonebot-plugin-apscheduler = ">=0.2,<0.4" nonebot-plugin-apscheduler = ">=0.2,<0.4"
nonebot-plugin-send-anything-anywhere = "^0.3.0" nonebot-plugin-send-anything-anywhere = "^0.4.0"
pillow = ">=8.1,<11.0" pillow = ">=8.1,<11.0"
pyjwt = "^2.1.0" pyjwt = "^2.1.0"
python-socketio = "^5.4.0" python-socketio = "^5.4.0"

View File

@ -34,8 +34,8 @@ async def test_send_no_queue(app: App, mocker: MockerFixture):
async def test_send_queue(app: App, mocker: MockerFixture): async def test_send_queue(app: App, mocker: MockerFixture):
import nonebot import nonebot
from nonebot.adapters.onebot.v11.bot import Bot from nonebot.adapters.onebot.v11.bot import Bot
from nonebot_plugin_saa.auto_select_bot import refresh_bots
from nonebot_plugin_saa import TargetQQGroup, MessageFactory from nonebot_plugin_saa import TargetQQGroup, MessageFactory
from nonebot_plugin_saa.utils.auto_select_bot import refresh_bots
from nonebot_bison.plugin_config import plugin_config from nonebot_bison.plugin_config import plugin_config
from nonebot_bison.send import MESSGE_SEND_INTERVAL, send_msgs from nonebot_bison.send import MESSGE_SEND_INTERVAL, send_msgs
@ -63,7 +63,7 @@ async def test_send_queue(app: App, mocker: MockerFixture):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_send_merge_no_queue(app: App): async def test_send_merge_no_queue(app: App):
from nonebot.adapters.onebot.v11.bot import Bot from nonebot.adapters.onebot.v11.bot import Bot
from nonebot_plugin_saa.utils.auto_select_bot import refresh_bots from nonebot_plugin_saa.auto_select_bot import refresh_bots
from nonebot_plugin_saa import Text, Image, TargetQQGroup, MessageFactory, AggregatedMessageFactory from nonebot_plugin_saa import Text, Image, TargetQQGroup, MessageFactory, AggregatedMessageFactory
from nonebot_bison.send import send_msgs from nonebot_bison.send import send_msgs
@ -108,7 +108,7 @@ async def test_send_merge_no_queue(app: App):
async def test_send_merge2_no_queue(app: App): async def test_send_merge2_no_queue(app: App):
from nonebot.adapters.onebot.v11.bot import Bot from nonebot.adapters.onebot.v11.bot import Bot
from nonebot_plugin_saa.utils.auto_select_bot import refresh_bots from nonebot_plugin_saa.auto_select_bot import refresh_bots
from nonebot_plugin_saa import Text, Image, TargetQQGroup, MessageFactory, AggregatedMessageFactory from nonebot_plugin_saa import Text, Image, TargetQQGroup, MessageFactory, AggregatedMessageFactory
from nonebot_bison.send import send_msgs from nonebot_bison.send import send_msgs