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
ZipFile.open() returns an instance of ZipExtFile if mode='r' and an instance of _ZipWriteFile if mode='w', but in typeshed its return type is IO[bytes].
Generally nowadays IO return types are a bit frowned upon in typeshed (at least by me). I'm actually on a snail-like long-term mission to eliminate IO in typeshed where possible. So any improvements here are very welcome!
ZipFile.open()
returns an instance ofZipExtFile
ifmode='r'
and an instance of_ZipWriteFile
ifmode='w'
, but in typeshed its return type isIO[bytes]
.typeshed/stdlib/zipfile/__init__.pyi
Lines 228 to 230 in 1cbfc75
Is this on purpose? Would it be possible instead to have an overload for each case?
The text was updated successfully, but these errors were encountered: