-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
[WIP] fix mypy errors #1586
[WIP] fix mypy errors #1586
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1586 +/- ##
=======================================
Coverage 90.05% 90.05%
=======================================
Files 108 108
Lines 11584 11584
=======================================
Hits 10432 10432
Misses 1152 1152
Continue to review full report at Codecov.
|
Checks are passed but how should I check if the mypy errors have been resolved? |
There should only be a To fix the errors you'll have to edit the actual arviz library, nothing should be modified in the examples folder. The first errors listed in the other PR for example are complaining that arviz/arviz/plots/traceplot.py Line 15 in a9e5812
To run mypy I believe you have to run |
a5a3fc0
to
5ef4827
Compare
Okay. So I have changed the type hint for The major doubt that I am having is before changing the type hint to I can see the 7 errors in case I pin |
Yes, because the ideal solution is doing option 2. Option 1 is a temporal fix that allows us to continue working on #1528 and not have to wait until we have time to fix all the issues (as we are all volunteers, it is not clear when we would have time and if it takes us too long maybe by the time we get to do it instead of 7 there are 30 errors). We are doing similar things with #1578 where we disabled some pylint checks to get CI to pass quickly but we did not fix those issues, or with #1537 where we have temporarily disabled pyjags tests because pyjags requires numpy >=1.20 and tensorflow probability requires numpy <=1.19 because our tfp converter is outdated. Fixing the converter is complicated and depends also on changes on tfp side so we feel it's better to wait for now until we can update the code and fix the root issue, if we updated the code now, we may have to rewrite it again in a few months |
Okay I got it now. Very nicely explained. Thank you! |
Do these changes needed to be listed in changelog? |
I don't think so, thanks! I am realizing that there are many other places where we have inputs type hinted as lists when they should be sequences. I will merge this to go ahead with typing copilot directly with latest mypy but keep the issue open. |
* Changed type ints for var_names * fix mypy errors
Description
Fixed mypy errors mentioned in #1528 (comment) by adding type hints to
var_names
andlatex_elements
. Addresses #1581Checklist