Skip to content

Commit

Permalink
⬆️ upgrade nonebot_plugin_saa
Browse files Browse the repository at this point in the history
  • Loading branch information
felinae98 committed Nov 22, 2023
1 parent ae9ac99 commit badb264
Show file tree
Hide file tree
Showing 9 changed files with 388 additions and 373 deletions.
2 changes: 1 addition & 1 deletion nonebot_bison/admin_page/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from fastapi.param_functions import Depends
from fastapi.exceptions import HTTPException
from nonebot_plugin_saa import TargetQQGroup
from nonebot_plugin_saa.auto_select_bot import get_bot
from fastapi.security.oauth2 import OAuth2PasswordBearer
from nonebot_plugin_saa.utils.auto_select_bot import get_bot

from ..types import WeightConfig
from ..apis import check_sub_target
Expand Down
2 changes: 1 addition & 1 deletion nonebot_bison/config/db_model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import datetime
from pathlib import Path

from nonebot_plugin_saa import PlatformTarget
from sqlalchemy.dialects.postgresql import JSONB
from nonebot_plugin_saa.utils import PlatformTarget
from nonebot_plugin_datastore import get_plugin_data
from sqlalchemy.orm import Mapped, relationship, mapped_column
from sqlalchemy import JSON, String, ForeignKey, UniqueConstraint
Expand Down
2 changes: 1 addition & 1 deletion nonebot_bison/config/subs_io/nbesf_model/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from abc import ABC

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

Expand Down
2 changes: 1 addition & 1 deletion nonebot_bison/config/subs_io/nbesf_model/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from nonebot.log import logger
from pydantic import BaseModel
from nonebot_plugin_saa.utils import AllSupportedPlatformTarget
from nonebot_plugin_saa.registries import AllSupportedPlatformTarget

from ..utils import NBESFParseErr
from ....types import Tag, Category
Expand Down
2 changes: 1 addition & 1 deletion nonebot_bison/post/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from PIL import Image
from nonebot.log import logger
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 .abstract_post import BasePost, AbstractPost
Expand Down
2 changes: 1 addition & 1 deletion nonebot_bison/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from collections import deque

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_plugin_saa.utils.auto_select_bot import refresh_bots
from nonebot_plugin_saa import MessageFactory, PlatformTarget, AggregatedMessageFactory

from .plugin_config import plugin_config
Expand Down
741 changes: 378 additions & 363 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nonebot-adapter-onebot = "^2.0.0"
nonebot-plugin-htmlrender = ">=0.2.0"
nonebot-plugin-datastore = ">=0.6.2,<2.0.0"
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"
pyjwt = "^2.1.0"
python-socketio = "^5.4.0"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ async def test_send_no_queue(app: App, mocker: MockerFixture):
async def test_send_queue(app: App, mocker: MockerFixture):
import nonebot
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.utils.auto_select_bot import refresh_bots

from nonebot_bison.plugin_config import plugin_config
from nonebot_bison.send import MESSGE_SEND_INTERVAL, send_msgs
Expand Down Expand Up @@ -63,7 +63,7 @@ async def test_send_queue(app: App, mocker: MockerFixture):
@pytest.mark.asyncio
async def test_send_merge_no_queue(app: App):
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_bison.send import send_msgs
Expand Down Expand Up @@ -108,7 +108,7 @@ async def test_send_merge_no_queue(app: App):

async def test_send_merge2_no_queue(app: App):
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_bison.send import send_msgs
Expand Down

0 comments on commit badb264

Please sign in to comment.