fix: add hypothesis dependency for type checks #25
This file contains 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
name: Type annotation (project) | |
on: | |
push: | |
paths: | |
- 'datalad_remake/**.py' | |
- '!**/tests/**.py' | |
jobs: | |
check-types-project: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
# run on a "fresh" python, but see mypy flag to check for the oldest supported version | |
python-version: 3.12 | |
architecture: x64 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install hatch (which pull mypy) | |
run: python -m pip install hatch | |
- name: Type check project | |
run: | | |
# get any type stubs that mypy thinks it needs | |
# specify `--disable-error-code=import-untyped` until the | |
# datalad-packages have type stubs for all their modules. | |
hatch run types:mypy --disable-error-code=import-untyped --install-types --non-interactive --follow-imports skip datalad_remake | |
# run mypy on the full project. | |
# run on the oldest supported Python version. | |
hatch run types:mypy --python-version 3.11 --disable-error-code=import-untyped --pretty --show-error-context datalad_remake |