Skip to content

Conversation

adamtheturtle
Copy link
Contributor

@adamtheturtle adamtheturtle commented Jul 27, 2025

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/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 "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]

@adamtheturtle adamtheturtle marked this pull request as draft July 27, 2025 09:25
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