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 4ac1f3b commit 3c0d967
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 3c0d967

Please sign in to comment.