修复类型错误

This commit is contained in:
2026-01-22 18:16:32 +08:00
parent d21966e985
commit 7640d96f86
22 changed files with 221 additions and 221 deletions

View File

@@ -13,7 +13,7 @@ async def fastapi_get_control_properties(network: str) -> dict[str, Any]:
return get_control(network)
@router.post("/setcontrolproperties/", response_model=None)
async def fastapi_set_control_properties(network: str, req: Request) -> ChangeSet:
async def fastapi_set_control_properties(network: str, req: Request) -> "ChangeSet":
props = await req.json()
return set_control(network, ChangeSet(props))
@@ -26,6 +26,6 @@ async def fastapi_get_rule_properties(network: str) -> dict[str, Any]:
return get_rule(network)
@router.post("/setruleproperties/", response_model=None)
async def fastapi_set_rule_properties(network: str, req: Request) -> ChangeSet:
async def fastapi_set_rule_properties(network: str, req: Request) -> "ChangeSet":
props = await req.json()
return set_rule(network, ChangeSet(props))