Skip to content

Resolve mypy type annotation issues in CI #328

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kurtmckee
Copy link
Contributor

Recent example of a mypy CI failure:

readme_renderer/rst.py:26: error: Unused "type: ignore" comment  [unused-ignore]
readme_renderer/rst.py:33: error: Argument 1 of "emptytag" is incompatible with supertype "docutils.writers._html_base.HTMLTranslator"; supertype defines the argument type as "Element"  [override]
readme_renderer/rst.py:33: note: This violates the Liskov substitution principle
readme_renderer/rst.py:33: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

The CI failures appear to be related to an updated release of types-docutils.

The failures were:

```
readme_renderer/rst.py:26: error: Unused "type: ignore" comment  [unused-ignore]
readme_renderer/rst.py:33: error: Argument 1 of "emptytag" is incompatible with supertype "docutils.writers._html_base.HTMLTranslator"; supertype defines the argument type as "Element"  [override]
readme_renderer/rst.py:33: note: This violates the Liskov substitution principle
readme_renderer/rst.py:33: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
```

The CI failures appear to be related to an updated release of `types-docutils`.
@kurtmckee
Copy link
Contributor Author

Well...shoot fire. The mypy tests now pass, but an unrelated issue has cropped up, and as with the mypy failures, the new issues are occurring in main with no code changes.

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.

1 participant