-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix type hints for Python 3.8 #1795
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1795 +/- ##
=======================================
Coverage 91.50% 91.51%
=======================================
Files 202 202
Lines 10904 10908 +4
=======================================
+ Hits 9978 9982 +4
Misses 926 926
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This reverts commit 13b5b5e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do we need a strategy or issue or something to remind us to remove the __future__
imports when we arrive in the future, i.e. when we drop 3.8?
Thanks for the quick review @zklaus! @ESMValGroup/technical-lead-development-team Would someone have time to merge this?
I'm not sure, maybe it will generate more noise than be helpful to create issues for these type of things. |
Thanks guys! |
Description
This fixes the issue with type hints breaking the program in Python 3.8.
It removes the need for allowing implicit optional function arguments.
It also updates the mypy version to a version that supports the
--implicit-optional
argument. I couldn't find in the changelog when exactly this feature was introduced, so I just pinned it to the latest version or newer. Maybe this is no longer needed, since I removed the implicit_optional command line argument in this pull request? It might be nice to have some lower version though.Fixes the type hints part of #1793.
Fixes #1789
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: