Open
Description
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]
.
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?