mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-05-22 18:21:18 +00:00
🔧 添加获取 FastAPI 实例的函数,更新配置文件路径以支持新的源文件
Some checks failed
Pytest API Testing / Pytes-API-Testing (push) Failing after 17s
Some checks failed
Pytest API Testing / Pytes-API-Testing (push) Failing after 17s
This commit is contained in:
parent
56996ef082
commit
efb13340f0
@ -3,6 +3,10 @@ from fastapi import FastAPI
|
|||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
|
def get_app() -> FastAPI:
|
||||||
|
"""获取 FastAPI 实例"""
|
||||||
|
return app
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
async def root():
|
async def root():
|
||||||
return {"message": "Hello LiteyukiBot"}
|
return {"message": "Hello LiteyukiBot"}
|
||||||
|
@ -3,7 +3,7 @@ import os
|
|||||||
import tomllib
|
import tomllib
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import yaml
|
import yaml # type: ignore[import]
|
||||||
|
|
||||||
type RawConfig = dict[str, Any]
|
type RawConfig = dict[str, Any]
|
||||||
|
|
||||||
|
@ -25,7 +25,9 @@ dev = [
|
|||||||
# 辅助工具配置
|
# 辅助工具配置
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 140
|
line-length = 140
|
||||||
src = ["liteyukibot", "main.py"]
|
src = ["liteyukibot", "cli", "main.py"]
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
select = ["I", "F", "E"]
|
select = ["I", "F", "E"]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user