-
Notifications
You must be signed in to change notification settings - Fork 252
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
Remove unused type: ignore
statements
#874
Conversation
type: ignore
statements
Makes sense! |
Not entirely unexpected, but there's some complications with running this on older See discussion: python/mypy#8823, not this is slightly different as we don't check in our code the current Python version, but still may be relevant. |
Perhaps controversial, but do we actually care about |
I was thinking similarly, need to think a bit more about implications. |
79908a9
to
b085312
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #874 +/- ##
=======================================
Coverage 85.28% 85.28%
=======================================
Files 74 74
Lines 8832 8832
=======================================
Hits 7532 7532
Misses 1300 1300
|
This PR adds the
mypy
optionswarn_unused_ignores = True
andwarn_redundant_casts = True
and fixes the resulting errors. This is motivated becausetype: ignore
statements can become stale as newer versions ofmypy
fix bugs and libraries against which we typecheck ship typing stubs and fix bugs therein (e.g.numpy
), see more here: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-warn-unused-ignoresWill open a similar PR for
alibi-detect
after SeldonIO/alibi-detect#738.@ascillitoe @mauicv FYI