mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-25 20:10:28 +08:00
💥 remove nonebot test auto init
This commit is contained in:
parent
6ac04d6507
commit
d624f13f96
@ -140,11 +140,6 @@ from nonebot.config import Env, Config
|
|||||||
from nonebot.log import logger, default_filter
|
from nonebot.log import logger, default_filter
|
||||||
from nonebot.adapters.cqhttp import Bot as CQBot
|
from nonebot.adapters.cqhttp import Bot as CQBot
|
||||||
|
|
||||||
try:
|
|
||||||
import nonebot_test
|
|
||||||
except ImportError:
|
|
||||||
nonebot_test = None
|
|
||||||
|
|
||||||
|
|
||||||
def init(*, _env_file: Optional[str] = None, **kwargs):
|
def init(*, _env_file: Optional[str] = None, **kwargs):
|
||||||
"""
|
"""
|
||||||
@ -192,11 +187,6 @@ def init(*, _env_file: Optional[str] = None, **kwargs):
|
|||||||
# register build-in adapters
|
# register build-in adapters
|
||||||
_driver.register_adapter("cqhttp", CQBot)
|
_driver.register_adapter("cqhttp", CQBot)
|
||||||
|
|
||||||
# load nonebot test frontend if debug
|
|
||||||
if config.debug and nonebot_test:
|
|
||||||
logger.debug("Loading nonebot test frontend...")
|
|
||||||
nonebot_test.init()
|
|
||||||
|
|
||||||
|
|
||||||
def run(host: Optional[str] = None,
|
def run(host: Optional[str] = None,
|
||||||
port: Optional[int] = None,
|
port: Optional[int] = None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user