Python lint takes 4-5mins to complete. I think if the mypy analysis is really on the order of 10s, the additional time won't matter and could always be enabled.
On Mon, Mar 2, 2020 at 1:21 PM Chad Dombrova <chad...@gmail.com> wrote: > I believe that mypy via pre-commit hook will be faster than 10s since it >> only applies to modified files. >> > > Correct, with a few caveats: > > - pre-commit can be setup to only run if a python file changes. so > modifying a java file won't trigger mypy to run. > - if *any* python file changes mypy has to run on the whole codebase, > because a change to one file can affect the others (i.e. a function arg > type changes). it's not really meaningful to run mypy on a single file. > - the mypy daemon tracks which files have changed, and runs > incremental updates. so if we setup the precommit hook to run the daemon, > we should see that get appreciably faster. I'll do some tests and report > back. > >