Skip to content
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
merged 6 commits into from
Sep 1, 2021
Merged

Conversation

michaeljones
Copy link
Collaborator

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.

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.
@michaeljones
Copy link
Collaborator Author

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.

Copy link
Contributor

@utzig utzig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaeljones
Copy link
Collaborator Author

Thank you @utzig

@michaeljones michaeljones merged commit 3591eb7 into master Sep 1, 2021
michaeljones pushed a commit that referenced this pull request Sep 14, 2021
Also chronologically sort by moving the entry for #721.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants