diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6276fe1c17..cb9e74ed98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,11 +34,8 @@ repos: rev: v0.942 hooks: - id: mypy - args: - - --ignore-missing-imports - # Silence errors about Python 3.9-style delayed type annotations on Python 3.8 - - --python-version - - "3.9" + # Override default --ignore-missing-imports + args: [] additional_dependencies: # Type stubs - types-docutils @@ -46,6 +43,7 @@ repos: - types-paramiko - types-PyYAML - types-psutil + - types-setuptools # Typed libraries - numpy - dask diff --git a/setup.cfg b/setup.cfg index dd99eccfc7..34fa189fe2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -59,3 +59,8 @@ timeout_method = thread # This should not be reduced; Windows CI has been observed to be occasionally # exceptionally slow. timeout = 300 + +[mypy] +# Silence errors about Python 3.9-style delayed type annotations on Python 3.8 +python_version = 3.9 +ignore_missing_imports = true