Skip to content

Commit

Permalink
fix: ignore import-untyped-error in mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-monch committed Oct 22, 2024
1 parent 48ccc63 commit 365db01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mypy-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
if: steps.changed-py-files.outputs.any_changed == 'true'
run: |
# get any type stubs that mypy thinks it needs
hatch run types:mypy --install-types --non-interactive --ignore-missing-imports --follow-imports skip ${{ steps.changed-py-files.outputs.all_changed_files }}
# specify `--disable-error-code=import-untyped` until the
# datalad-packages have type stubs for all their modules.
hatch run types:mypy --install-types --non-interactive --disable-error-code=import-untyped --follow-imports skip ${{ steps.changed-py-files.outputs.all_changed_files }}
# run mypy on the modified files only, and do not even follow imports.
# this results is a fairly superficial test, but given the overall
# state of annotations, we strive to become more correct incrementally
# with focused error reports, rather than barfing a huge complaint
# that is unrelated to the changeset someone has been working on.
# run on the oldest supported Python version.
# specify `--ignore-missing-imports` until the datalad-packages have
# type stubs for all their modules.
hatch run types:mypy --python-version 3.11 --ignore-missing-imports --follow-imports skip --pretty --show-error-context ${{ steps.changed-py-files.outputs.all_changed_files }}
hatch run types:mypy --python-version 3.11 --disable-error-code=import-untyped --follow-imports skip --pretty --show-error-context ${{ steps.changed-py-files.outputs.all_changed_files }}
8 changes: 4 additions & 4 deletions .github/workflows/mypy-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
- name: Type check project
run: |
# get any type stubs that mypy thinks it needs
hatch run types:mypy --install-types --non-interactive --follow-imports skip datalad_remake
# 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.
# specify `--ignore-missing-imports` until the datalad-packages have
# type stubs for all their modules.
hatch run types:mypy --python-version 3.11 --ignore-missing-imports --pretty --show-error-context datalad_remake
hatch run types:mypy --python-version 3.11 --disable-error-code=import-untyped --pretty --show-error-context datalad_remake

0 comments on commit 365db01

Please sign in to comment.