In a recent PR I changed functions such as
limit: Annotated[int | None, Query(ge=1, le=LIMIT_MAX)] = 10,
towards
limit: int = Query(ge=1, le=LIMIT_MAX, default=10),
Can you assign me? I will take up this issue next week as its scope is excellent for me to get a little more acquainted with the project development flow and project structure.
In a recent PR I changed functions such as
limit: Annotated[int | None, Query(ge=1, le=LIMIT_MAX)] = 10,
towardslimit: int = Query(ge=1, le=LIMIT_MAX, default=10),
But, this is not a best practices, as Jean Matias pointed out. FastAPI suggests we use
Annotated
: https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#advantages-of-annotated.So, let's rewrite all
= Query
and= Path
to theirAnnotated
variant.