🔧 修改 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:
呵呵です
2025-12-25 22:32:25 +08:00
committed by GitHub
parent a4ffb6bbc6
commit fcecf5a01f
16 changed files with 43 additions and 35 deletions

View File

@@ -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)