fixed type errors

This commit is contained in:
Kristian Krsnik 2024-08-05 00:17:15 +02:00
parent 9f2e496f4f
commit c10ff428f6
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@
projectDir = self; projectDir = self;
checkPhase = checkPhase =
if debug if debug
then "pyright && pytest" then "pyright --warnings testdata && pytest"
else ""; else "";
# doCheck = debug; # doCheck = debug;
preferWheels = false; preferWheels = false;

4
testdata/api.py vendored
View File

@ -1,4 +1,4 @@
from fasthtml.fastapp import * from fasthtml.fastapp import FastHTML
from starlette import status from starlette import status
from starlette.responses import StreamingResponse from starlette.responses import StreamingResponse
from starlette.exceptions import HTTPException 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): class MinSizePerRequestError(Exception):
pass pass
@api.get('/') @api.get('/') # type: ignore
async def test_data(api_key: str, size: str) -> StreamingResponse: async def test_data(api_key: str, size: str) -> StreamingResponse:
try: try:
body = TestDataBody(api_key=api_key, size=size) # type: ignore body = TestDataBody(api_key=api_key, size=size) # type: ignore