-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
enable mypy linting on tests/
directory
#12097
Comments
Haha clearly for me. I once run mypy on tests by mistake and I got so many errors that I gave up. It will be a long-standing task though. |
definitely an incremental approach then! as in, add all test modules to the allow list and then remove them one at a time |
yes, that was the idea. I'll take care of this err... perhaps tomorrow (namely, making the white list, not fixing the errors) |
i had a quick look at this. I think if you could refactor and annotate the 'assert_node' method that alone would be a huge improvement. That is one ugly method. |
Ok bad news:
[nodes.table, nodes.tgroup, (nodes.colspec,
nodes.colspec,
nodes.colspec,
[nodes.tbody, nodes.row])] is actually a
For now, I think we need to suppress every mypy error manually.. or just ignore them but it doesn't really solve our original problem =/ |
it might not be that complicated:
i'm not sure what you mean? that type you've copied looks to me like a
a mypy plugin seems like overkill
|
The Element
Yes but when you do a reveal_type with mypy, it's |
Is there work remaining here @danieleades? Clearly there are still modules in the blacklist, but does this issue need to remain open? A |
Probably not |
mypy currently ignores the tests/ directory. We should enable it.
@picnixz this is likely a job for you as you're far more comfortable with the sphinx tests than I!
This could also be done incrementally using the 'allow-list' approach i've been using to ratchet up the type linting strictness in the main package
The text was updated successfully, but these errors were encountered: