On Fri, May 20, 2022, 6:32 AM Dan Stromberg email@example.com wrote:
I've used Mypy and liked it in combination with MonkeyType.
I've heard there are alternatives to Mypy that are faster, and I'm looking at using something like this on a 457,000 line project.
Are there equivalents to MonkeyType that will work with these alternatives to Mypy?
And has Mypy become the defacto standard for how type annotations should look? That is, are there other tools that assume Mypy's format too, and does most doc about type annotations assume Mypy's style?
All Python analysis type annotation consuming tools use the same type annotation syntax. Coordination among all of them and planning future directions of Python type annotation concepts happens over on typing-sig. So no, mypy is not the standard. It is merely one user among many.
mypy, pytype, pycharm, pyright, pyre, I'm probably missing some others. Each has it's own features or limitations. pytype does type inferencing for example so it can be of some use even on un-annotated code. Some others are single function or file focused. Some only add value when annotations exist.
mypy and pytype and presumably pyre are used regularly on Python codebases with 10s-100s of millions of lines. Though typically with additional infrastructure that allows performance to not suck by caching analysis of bits to avoid reanalysis.
Mypy has _I believe_ gone the furthest on the open source side on enabling huge project analysis performance via a combo of the mypy daemon and their mypyc accelerator.
PS: I sent this to python-list first five days ago, but didn't get a single reply.
code-quality mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/code-quality.python.org/ Member address: firstname.lastname@example.org