mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
🔧 修改 basedpyright 配置 (#573)
* 🔧 修改 basedpyright 配置 * 🚨 auto fix by pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,11 @@ from .templates import TEMPLATES_DIR
|
||||
if TYPE_CHECKING:
|
||||
from pydantic import IPvAnyAddress
|
||||
|
||||
app: FastAPI = get_app()
|
||||
app = get_app()
|
||||
|
||||
if not isinstance(app, FastAPI):
|
||||
msg = '本插件需要 FastAPI 驱动器才能运行'
|
||||
raise RuntimeError(msg) # noqa: TRY004
|
||||
|
||||
driver = get_driver()
|
||||
|
||||
@@ -28,10 +32,6 @@ global_config = driver.config
|
||||
|
||||
BASE_URL = URL('https://tetr.io/user-content/')
|
||||
|
||||
if not isinstance(app, FastAPI):
|
||||
msg = '本插件需要 FastAPI 驱动器才能运行'
|
||||
raise RuntimeError(msg) # noqa: TRY004
|
||||
|
||||
NOT_FOUND = HTMLResponse('404 Not Found', status_code=status.HTTP_404_NOT_FOUND)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user