Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More idiomatic mypy configuration #6022

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ 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"
args: []
crusaderky marked this conversation as resolved.
Show resolved Hide resolved
crusaderky marked this conversation as resolved.
Show resolved Hide resolved
additional_dependencies:
# Type stubs
- types-docutils
- types-requests
- types-paramiko
- types-PyYAML
- types-psutil
- types-setuptools
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert #6017 - this is still used by mypy to validate setup.py (you can see it by setting ignore_missing_imports = false below)

# Typed libraries
- numpy
- dask
Expand Down
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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