top | item 42872070

(no title)

E_Bfx | 1 year ago

In a medium size codebase (~ 100 python modules of 200 lines), mypy take 5 minutes to type check. This can be a problem for a CI.

discuss

order

wk_end|1 year ago

Just to throw my anecdote in: I used to work at the mypy shop - our client code base was on the order of millions of lines of very thorny Python code. This was several years ago, but to the best of my recollection, even at that scale, mypy was nowhere near that slow.

Like I said, this was many years ago - mypy might've gotten slower, but computers have also gotten faster, so who knows. My hunch is still that you have an issue with misconfiguration, or perhaps you're hitting a bug.

wavemode|1 year ago

My current company is a Python shop, 1M+ LOC. My CI run earlier today completed mypy typechecking in 9 minutes 5 seconds. Take from that what you will.

E_Bfx|1 year ago

I guess that there is something with the cache that we don't do right. Thanks for your return.

zelphirkalt|1 year ago

Never happened for me. Similarly sized code base, done in seconds, if not 1s. Guess we all have our anecdotes.

sgarland|1 year ago

I think you have something misconfigured, or are timing incorrectly. I'm working on a project right now with ~10K LOC. I haven't timed it, but it's easily <= 2 seconds. Even if I nuke MyPy's cache, it's at most 5 seconds. This is on an M3 MBP FWIW.

imron|1 year ago

And with dmypy (included with myoy) it’s even faster