superlinear-ai/poetry-cookiecutter

Why use pydantic's mypy plugin with typer?

JonathanPlasse opened this issue · 2 comments

Pydantic is a library to handle data validation using standard modern Python type annotations.
It powers FastAPI underneath.
It is not used by Typer, but it inspired a lot of the design (through FastAPI).1

It also does not support models.2

Footnotes

  1. Reference

  2. Reference

Hi @JonathanPlasse, yes I think you're right. The reason Pydantic is currently enabled with Typer is because we use Pydantic with Typer, but that's wouldn't necessarily be true in general. We'll address it in an upcoming PR!

Solved with #131!