Uh oh!
There was an error while loading. Please reload this page.
fix types in io - #3485
Conversation
christopher-hesse
commented
Nov 23, 2019
The fact that the tests fail makes me think this is not correct. I'm not certain why that is though. |
christopher-hesse
commented
Nov 23, 2019
Guess this should be two PRs. |
srittau
commented
Dec 3, 2019
IO types are quite problematic in typeshed at the moment. Changes tend to break lots of code. The ultimate goal is to use protocols for parameter types and concrete types as return values. Attributes and other cases must be looked at on a case-by-case basis. But we are still a long way off from that goal. I've marked this PR as "deferred" for now. |
christopher-hesse
commented
Dec 4, 2019
Thanks, I noticed the odd lack of protocols after trying to use type checking with io objects for a bit and ended up using some dumpy fake protocol: https://github.com/cshesse/blobfile/blob/master/blobfile/ops.py#L1065 and cast()ing return values to pretend to be the correct types. |
JelleZijlstra
commented
Jun 2, 2020
Superseded by #4145 |
It's not clear to me what the relation between
BufferedIOBaseandIO[bytes]is, but according to the io docs the current code seems incorrect.