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

improve type annotations in 'docutils.readers.standalone' #13321

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

danieleades
Copy link
Contributor

No description provided.

This comment has been minimized.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/transforms/i18n.py: note: In function "publish_msgstr":
+ sphinx/transforms/i18n.py:88:20: error: Incompatible return value type (got "Node", expected "Element")  [return-value]
+ sphinx/io.py:38: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py:38:24: error: Missing type parameters for generic type "Reader"  [type-arg]
+ sphinx/io.py:38:24: note: Error code "type-arg" not covered by "type: ignore" comment
+ sphinx/io.py: note: In member "new_document" of class "SphinxBaseReader":
+ sphinx/io.py:82:46: error: "SphinxBaseReader" has no attribute "settings"  [attr-defined]
+ sphinx/io.py: note: At top level:
+ sphinx/io.py:102: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py: note: In member "read_source" of class "SphinxStandaloneReader":
+ sphinx/io.py:111:19: error: Item "None" of "Input[Any] | None" has no attribute "read"  [union-attr]

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