cookiecutter-spacy-fastapi
cookiecutter-spacy-fastapi copied to clipboard
Add annotations to return values
I think it's nice to have annotation for return values :) I'd liked to use something instead of List[dict]
but it feels kinda confusing to use List[Dict[str, Union[str, list]]
. I'd use pydantic model here or dataclass, but it's overkill here imo
Sorry for the late review on this but thanks for taking an interest!
I'd prefer the more detailed type annotation rather than List[dict]
but your point on just using Pydantic models is valid and I'd welcome that contribution if you'd like to make it.
Otherwise, I'll plan to update this repo with some best practice changes (like using Pydantic types all the way through) later this month or next month
Sure, I'll make PR using Pydantic models. Can't say when, but hope I'll have time this month