Closed effigies closed 1 year ago
Patch coverage has no change and project coverage change: +0.08
:tada:
Comparison is base (
3a4cc5e
) 92.06% compared to head (cf43308
) 92.14%.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Thanks to @Factral in https://github.com/nipy/nibabel/pull/1208#issuecomment-1447182785 I realized that we could probably make the contribution process a little nicer to people not wanting to
pip install -e
orhatch build --hooks-only
just to make the pre-commit hooks run cleanly.This adds a
_version.pyi
thatmypy
will respect without even checking whether_version.py
is present.The biggest potential risk is
setuptools-scm
changing the contents of_version.py
in the future, but that seems low and a thing we can deal with if it comes up.No need to backport unless we get contributors to a maintenance branch.
Verifying:
```console ~/Projects/nipy ❯ git clone nibabel/.git nibabel-mypy-test Cloning into 'nibabel-mypy-test'... done. ~/Projects/nipy ❯ cd nibabel-mypy-test nibabel-mypy-test on typ/version_stub ❯ pre-commit install pre-commit installed at .git/hooks/pre-commit nibabel-mypy-test on typ/version_stub ❯ pre-commit run --all trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check yaml...............................................................Passed check json...............................................................Passed check toml...............................................................Passed check for added large files..............................................Passed check for case conflicts.................................................Passed check for merge conflicts................................................Passed check vcs permalinks.....................................................Passed blue.....................................................................Passed isort....................................................................Passed flake8...................................................................Passed mypy.....................................................................Passed ``` Reverting to `master`: ```console ❯ git checkout master Branch 'master' set up to track remote branch 'master' from 'origin'. Switched to a new branch 'master' nibabel-mypy-test on master ❯ pre-commit run --all trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check yaml...............................................................Passed check json...............................................................Passed check toml...............................................................Passed check for added large files..............................................Passed check for case conflicts.................................................Passed check for merge conflicts................................................Passed check vcs permalinks.....................................................Passed blue.....................................................................Passed isort....................................................................Passed flake8...................................................................Passed mypy.....................................................................Failed - hook id: mypy - exit code: 1 nibabel/pkg_info.py:9: error: Cannot find implementation or library stub for module named "nibabel._version" [import] nibabel/pkg_info.py:9: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 107 source files) ```