ffdev-info / template.py

Template repository for Python projects
0 stars 0 forks source link

To mypy or not to mypy #3

Open ross-spencer opened 7 months ago

ross-spencer commented 7 months ago

Mypy can perform static analysis on Python code that includes typing, e.g. https://mitelman.engineering/blog/python-best-practice/automating-python-best-practices-for-a-new-project/

But also, pydantic has built in context managers that can validate input into functions and that combined with type hints might be enough.

For this repo, it depends whether it is a sensible default, so perhaps mypy can be included for hints/linting only and shouldn't cause any failures.