You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't see what typeshed can do differently here. Returning Optional[bytes] would be more correct, but has the practical problem that the caller would need to assert that the return values are not None.
That's what the comments say at least, and I think I agree.
So I tried to fix it, but got this running
python3 tests/mypy_selftest.py
:Here's the patch I tried to apply:
And here's the source code that the complaint was about:
The error is about the last line passing
Union[bytes, str, None]
intosplit_lines()
, which expects abytes
.Since I don't know what to do here (and I would like to get rid of the
Any
s), I'm filing this ticket.Help!
Or at least some comments about what the "morally wrong"
Any
s are doing there would be nice :)./Johan
The text was updated successfully, but these errors were encountered: