-
Notifications
You must be signed in to change notification settings - Fork 159
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
Adjust for mypy 1.11 #864
Adjust for mypy 1.11 #864
Conversation
- These @overload decorations ensure that type checking of downstream code can identify the return type of the function according to the value of the wrap= argument. - Confirm hints are usable by type checking the corresponding test function.
Please note that I've also opened python/mypy#17569 to verify this change. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #864 +/- ##
=====================================
Coverage 95.6% 95.6%
=====================================
Files 46 46
Lines 4333 4344 +11
=====================================
+ Hits 4143 4154 +11
Misses 190 190
|
- Simplify use of helper functions. - Use subscript notation for dimensionality of quantities, consistent with MESSAGE internal docs. - Add example output from Reporter.visualize().
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.
All tests passing again, looks good to me :)
This PR adjust for some type checking failures seen via CI upon the release of mypy 1.11. @glatterf42 identified that both were due to the new checking of arguments to partial().
Also:
.operator.stacked_bar(…, dims=…)
is adjusted to allow stacking 2+ dimensions, with an exception thrown if the argument is invalid. This corrects the appearance of the final plot in westeros_fossil_resource.ipynb, which previously had 'grade' on the ordinate..operator.as_message_df()
. A different return type is indicated according to the wrap= argument.How to review
Read the diff and note that the CI checks all pass.
PR checklist
Add or expand tests;coverage checks both ✅Add, expand, or update documentation.Type hints only.Update release notes.