修复类型错误

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

@@ -21,7 +21,7 @@ async def fastapi_get_coord(network: str, node: str) -> dict[str, Any]:
# example: set_coord(p, ChangeSet({'node': 'j1', 'x': 1.0, 'y': 2.0}))
@router.post("/setcoord/", response_model=None)
async def fastapi_set_coord(network: str, req: Request) -> ChangeSet:
async def fastapi_set_coord(network: str, req: Request) -> "ChangeSet":
props = await req.json()
return set_coord(network, ChangeSet(props))
@@ -76,5 +76,5 @@ async def fastapi_get_all_coords(network: str) -> list[Any]:
@router.get("/projectcoordinates/")
async def fastapi_project_coordinates(
network: str, from_epsg: int, to_epsg: int
) -> ChangeSet:
) -> "ChangeSet":
return project_coordinates(network, from_epsg, to_epsg)