typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

[docutils] Add missing stubs for `readers` dir

Open donbarbos opened this issue 8 months ago • 1 comments

donbarbos avatar Jun 08 '25 08:06 donbarbos

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/io.py:33: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py:33:24: error: Missing type parameters for generic type "Reader"  [type-arg]
+ sphinx/io.py:33:24: note: Error code "type-arg" not covered by "type: ignore" comment
+ sphinx/io.py:92: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py: note: In member "read" of class "SphinxStandaloneReader":
+ sphinx/io.py:97:16: error: Incompatible return value type (got "None", expected "document")  [return-value]
+ sphinx/io.py: note: In member "read_source" of class "SphinxStandaloneReader":
+ sphinx/io.py:101:19: error: Item "None" of "Input[Any] | None" has no attribute "read"  [union-attr]
+ sphinx/transforms/i18n.py: note: In function "publish_msgstr":
+ sphinx/transforms/i18n.py:123:20: error: Incompatible return value type (got "Node", expected "Element")  [return-value]

github-actions[bot] avatar Jun 08 '25 09:06 github-actions[bot]

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

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/io.py:35: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py:35:24: error: Missing type parameters for generic type "Reader"  [type-arg]
+ sphinx/io.py:35:24: note: Error code "type-arg" not covered by "type: ignore" comment
+ sphinx/io.py:95: error: Unused "type: ignore" comment  [unused-ignore]
+ sphinx/io.py: note: In member "read" of class "SphinxStandaloneReader":
+ sphinx/io.py:100:16: error: Incompatible return value type (got "None", expected "document")  [return-value]
+ sphinx/io.py: note: In member "read_source" of class "SphinxStandaloneReader":
+ sphinx/io.py:104:19: error: Item "None" of "Input[Any] | None" has no attribute "read"  [union-attr]

github-actions[bot] avatar Jul 07 '25 15:07 github-actions[bot]