From c10ff428f6fc46e2f4dd2aee676e93901ec60cae Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Mon, 5 Aug 2024 00:17:15 +0200 Subject: [PATCH] fixed type errors --- flake.nix | 2 +- testdata/api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 9cdce48..f4c0dbd 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,7 @@ projectDir = self; checkPhase = if debug - then "pyright && pytest" + then "pyright --warnings testdata && pytest" else ""; # doCheck = debug; preferWheels = false; diff --git a/testdata/api.py b/testdata/api.py index b5f04cf..c2c4a18 100644 --- a/testdata/api.py +++ b/testdata/api.py @@ -1,4 +1,4 @@ -from fasthtml.fastapp import * +from fasthtml.fastapp import FastHTML from starlette import status from starlette.responses import StreamingResponse from starlette.exceptions import HTTPException @@ -18,7 +18,7 @@ def create_api(api_keys: set[str], max_size: int, max_data: int, database: str, class MinSizePerRequestError(Exception): pass - @api.get('/') + @api.get('/') # type: ignore async def test_data(api_key: str, size: str) -> StreamingResponse: try: body = TestDataBody(api_key=api_key, size=size) # type: ignore