remove typing

This commit is contained in:
2025-04-13 20:26:39 -03:00
parent ef4a6afdf4
commit f3d2be6642

4
app.py
View File

@@ -1,5 +1,3 @@
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@@ -11,5 +9,5 @@ def read_root():
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}