mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-06-23 05:56:51 +08:00
♻️ 迁移到 uv 并重写 Dockerfile (#667)
Co-authored-by: BalconyJH <balconyjh@gmail.com> Co-authored-by: suyiiyii <suyiiyii@gmail.com>
This commit is contained in:
@@ -9,14 +9,16 @@ from nonebot import logger, require
|
||||
from playwright.async_api import Cookie
|
||||
|
||||
from nonebot_bison.config.db_model import Cookie as CookieModel
|
||||
from nonebot_bison.plugin_config import plugin_config
|
||||
from nonebot_bison.utils import Site, http_client
|
||||
from nonebot_bison.utils.site import CookieClientManager
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .platforms import Bilibili
|
||||
|
||||
require("nonebot_plugin_htmlrender")
|
||||
from nonebot_plugin_htmlrender import get_browser
|
||||
if plugin_config.bison_use_browser:
|
||||
require("nonebot_plugin_htmlrender")
|
||||
from nonebot_plugin_htmlrender import get_browser
|
||||
|
||||
B = TypeVar("B", bound="Bilibili")
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ class SiteMeta(type):
|
||||
elif not kwargs.get("abstract"):
|
||||
# this is the subclass
|
||||
if "name" in namespace:
|
||||
site_manager[namespace["name"]] = cls
|
||||
site_manager[namespace["name"]] = cls # type: ignore[reportArgumentType]
|
||||
super().__init__(name, bases, namespace, **kwargs)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user