Fix ability to run mypy via hatch#3952
Open
chuckwondo wants to merge 2 commits intozarr-developers:mainfrom
Open
Fix ability to run mypy via hatch#3952chuckwondo wants to merge 2 commits intozarr-developers:mainfrom
chuckwondo wants to merge 2 commits intozarr-developers:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3952 +/- ##
==========================================
+ Coverage 93.22% 93.26% +0.04%
==========================================
Files 87 87
Lines 11721 11721
==========================================
+ Hits 10927 10932 +5
+ Misses 794 789 -5 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test script for running mypy via hatch was broken because mypy is a dev dep, not a test dep. This means that this was broken because
mypycould not be found:This PR adds a dev env that depends on the dev dep group so that we can now run the following:
Note, however, that the output from the command above will expose numerous mypy errors that are currently masked by the equivalent pre-commit hook because the pre-commit hook pins numpy to an earlier version.
As far as I can tell, numpy is pinned to an earlier version in the pre-commit hook precisely because of a slew of new typing errors that were initially raised when a newer version of numpy was pulled into the dep tree. Thus pinning to an earlier version is currently masking/deferring the typing issues.
Note also that the script is now simply
mypy, notrun-mypybecause there's no need for an explicit script entry in pyproject.toml in this case.For now, this is not in the CI path, so will not cause builds to fail. Rather it allows us to manually produce a complete list of masked typing issues, so we can separately address the issues, as we see fit.
TODO: