fixed type errors
This commit is contained in:
parent
9f2e496f4f
commit
c10ff428f6
@ -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
4
testdata/api.py
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user