-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Attempt to fix mypy issues that are failing on CI #731
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To keep mypy happy. I think we can assume that in all cases it isn't None otherwise we would have had some issues by now.
We want to have at least mypy 0.900 and to have the types for docutils. Types are packaged separately from mypy 0.900 onwards.
So that mypy is happy in another class that is expecting these to be there.
As there isn't a stub file in the docutils type definitions for it so we can't really have them at the moment. https://github.com/python/typeshed/tree/d4f07254526840102f02f7f968b2e5a473b45c33/stubs/docutils/docutils/parsers/rst
Somehow we install this and run it on CI. I think it is reasonable to have it in the development requirements.
As noted in the comment, this should be done when 4.0.x was merged into 4.x and that was done in this commit: sphinx-doc/sphinx@60b4cd4 Without this we fail on CI as 4.0.x doesn't exist any more.
I'm in the odd position of not knowing if I can just merge this for a repo that is under my name. I think it is all good but happy for a second opinion if anyone is around. |
utzig
approved these changes
Aug 31, 2021
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
Thank you @utzig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm quite new to mypy having been away from the Python ecosystem for a while now but given the information I could get from the docs and the state of the docutils typings and the way we've written this code, I think these are reasonable changes to make.