Skip to content

Commit

Permalink
mypy config: Don't ignore missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Nov 8, 2023
1 parent df34c80 commit ac0c9a6
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dandi/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# A trick found on https://github.com/h5py/h5py/issues/1079#issuecomment-567081386
# to avoid some weird behavior on Yarik's laptop where MPI fails to initialize
# and that takes h5py additional 5 seconds to import
import mpi4py
import mpi4py # type: ignore[import-not-found]

mpi4py.rc(initialize=False)
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion dandi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _pdb_excepthook(
pdb.post_mortem(tb)

if ipython:
from IPython.core import ultratb
from IPython.core import ultratb # type: ignore[import]

sys.excepthook = ultratb.FormattedTB(
mode="Verbose",
Expand Down
72 changes: 71 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ exclude-file = .codespellignore
#allow_untyped_defs = False
implicit_reexport = False
allow_incomplete_defs = False
ignore_missing_imports = True
ignore_missing_imports = False
no_implicit_optional = True
local_partial_types = True
pretty = True
Expand All @@ -151,12 +151,82 @@ warn_unreachable = True
plugins = pydantic.mypy
exclude = _version\.py|due\.py

[mypy-dandi.*]
ignore_missing_imports = True

[mypy-dandi._version]
follow_imports = skip

[mypy-dandi.due]
follow_imports = skip

[mypy-bidsschematools.*]
# <https://github.com/bids-standard/bids-specification/issues/1484>
ignore_missing_imports = True

[mypy-click_didyoumean.*]
# <https://github.com/click-contrib/click-didyoumean/issues/16>
ignore_missing_imports = True

[mypy-etelemetry.*]
# <https://github.com/sensein/etelemetry-client/issues/53>
ignore_missing_imports = True

[mypy-fasteners.*]
# <https://github.com/harlowja/fasteners/issues/111>
ignore_missing_imports = True

[mypy-fscacher.*]
ignore_missing_imports = True

[mypy-fsspec.*]
# <https://github.com/fsspec/filesystem_spec/issues/625>
ignore_missing_imports = True

[mypy-joblib.*]
# <https://github.com/joblib/joblib/issues/1516>
ignore_missing_imports = True

[mypy-h5py.*]
# <https://github.com/h5py/h5py/issues/1912>
ignore_missing_imports = True

[mypy-hdmf.*]
# <https://github.com/hdmf-dev/hdmf/issues/994>
ignore_missing_imports = True

[mypy-keyrings.alt.*]
# <https://github.com/jaraco/keyrings.alt/issues/52>
ignore_missing_imports = True

[mypy-nwbinspector.*]
# <https://github.com/NeurodataWithoutBorders/nwbinspector/issues/416>
ignore_missing_imports = True

[mypy-pynwb.*]
# <https://github.com/NeurodataWithoutBorders/pynwb/issues/1408>
ignore_missing_imports = True

[mypy-pyout.*]
# <https://github.com/pyout/pyout/issues/142>
ignore_missing_imports = True

[mypy-semantic_version.*]
# <https://github.com/rbarrois/python-semanticversion/issues/138>
ignore_missing_imports = True

[mypy-vcr.*]
# <https://github.com/kevin1024/vcrpy/issues/780>
ignore_missing_imports = True

[mypy-zarr.*]
# <https://github.com/zarr-developers/zarr-python/issues/1566>
ignore_missing_imports = True

[mypy-zarr_checksum.*]
# <https://github.com/dandi/zarr_checksum/issues/5>
ignore_missing_imports = True

[pydantic-mypy]
init_forbid_extra = True
warn_untypes_fields = True

0 comments on commit ac0c9a6

Please sign in to comment.