You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mypy quite often needs a complete set of requirements installed in order to function properly.
pre-commit creates a fresh environment for each hook and basically doesn't install anything other than the hook itself.
We can provide additional dependencies for pre-commit to install along with the hook, but that'd mean duplicating the requirements and having to maintain them both up-to-date.
A pre-commit hook can be run from the external environment, instead of its isolated one, but that'd then make it dependant on a properly configured environment, which won't always be the case, and that'd limit where pre-commit can be run from.
Another option would be to have the hook install the full set of requirements, but that'd add a considerable slowdown.
Since running pytest already requires a fully working environment, that could be a nice place to have Mypy run.
Perhaps a subset of Mypy features can still be called from pre-commit.
Mypy quite often needs a complete set of requirements installed in order to function properly.
pre-commit creates a fresh environment for each hook and basically doesn't install anything other than the hook itself.
We can provide additional dependencies for pre-commit to install along with the hook, but that'd mean duplicating the requirements and having to maintain them both up-to-date.
A pre-commit hook can be run from the external environment, instead of its isolated one, but that'd then make it dependant on a properly configured environment, which won't always be the case, and that'd limit where pre-commit can be run from.
Another option would be to have the hook install the full set of requirements, but that'd add a considerable slowdown.
Since running pytest already requires a fully working environment, that could be a nice place to have Mypy run.
Perhaps a subset of Mypy features can still be called from pre-commit.
https://jaredkhan.com/blog/mypy-pre-commit
pre-commit/pre-commit#880 (comment)
https://github.com/dbader/pytest-mypy
The text was updated successfully, but these errors were encountered: