Skip to content

Conversation

@danieleades
Copy link
Contributor

based on findings in sphinx-doc/sphinx#13634

should be retested after that PR is merged

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

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

sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/transforms/__init__.py: note: In member "apply" of class "SphinxSmartQuotes":
- sphinx/transforms/__init__.py:373:9: error: Cannot assign to class variable "smartquotes_action" via instance  [misc]
+ sphinx/util/rst.py:69: error: Unused "type: ignore" comment  [unused-ignore]
- sphinx/util/docutils.py:469:16: error: Call to untyped function "write" in typed context  [no-untyped-call]
+ sphinx/util/docutils.py:455:5: error: Signature of "write" incompatible with supertype "docutils.io.FileOutput"  [override]
+ sphinx/util/docutils.py:455:5: note:      Superclass:
+ sphinx/util/docutils.py:455:5: note:          @overload
+ sphinx/util/docutils.py:455:5: note:          def write(self, data: str) -> str | bytes
+ sphinx/util/docutils.py:455:5: note:          @overload
+ sphinx/util/docutils.py:455:5: note:          def write(self, data: bytes) -> bytes
+ sphinx/util/docutils.py:455:5: note:      Subclass:
+ sphinx/util/docutils.py:455:5: note:          def write(self, data: str) -> str
+ sphinx/util/docutils.py:469:16: error: Incompatible return value type (got "str | bytes", expected "str")  [return-value]
- sphinx/directives/__init__.py: note: In member "run" of class "DefaultRole":
- sphinx/directives/__init__.py:329:24: error: Argument 2 to "role" has incompatible type "_RstLanguageModule"; expected "_LanguageModule"  [arg-type]

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