Hello people. 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? Thanks! PS: I sent this to python-list first five days ago, but didn't get a single reply.
On Fri, May 20, 2022, 6:32 AM Dan Stromberg <drsalists@gmail.com> wrote:
Hello people.
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. -gps
Thanks!
PS: I sent this to python-list first five days ago, but didn't get a single reply.
_______________________________________________ code-quality mailing list -- code-quality@python.org To unsubscribe send an email to code-quality-leave@python.org https://mail.python.org/mailman3/lists/code-quality.python.org/ Member address: greg@krypto.org
Hi Dan Sorry for being late to the party. If you are still interested, I'm working on a Mypy/Jedi rewrite in Rust, which is supposed to be 10-100 times faster than Mypy (or Jedi). Currently the mypy tests I'm running are ~500 times faster than what I can see in Mypy. If you are still interested, I'm very happy to talk to you about how my rewrite could improve your workflow, because your issues are exactly why I'm doing this. It's however not open source at this point. ~ Dave Am Fr., 20. Mai 2022 um 13:33 Uhr schrieb Dan Stromberg <drsalists@gmail.com
:
Hello people.
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?
Thanks!
PS: I sent this to python-list first five days ago, but didn't get a single reply.
_______________________________________________ code-quality mailing list -- code-quality@python.org To unsubscribe send an email to code-quality-leave@python.org https://mail.python.org/mailman3/lists/code-quality.python.org/ Member address: davidhalter88@gmail.com
participants (3)
-
Dan Stromberg
-
Dave Halter
-
Gregory P. Smith