Regression: IO[str] not compatible with SupportsWrite[AnyStr] #17863
Labels
bug
mypy got something wrong
false-positive
mypy gave an error on correct code
topic-protocols
topic-type-variables
This code generates a false positive, but type checked cleanly on mypy 1.11:
I believe the reason is that the definition of
IO.write
changed in typeshed, and this triggered a mypy bug. Here's howIO.write
is currently defined:The text was updated successfully, but these errors were encountered: