mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
`zipfile.ZipFile` is typed to accept `Text` for local and archive file paths. In Python 3.6, several `ZipFile` methods accept `pathlib.Path` objects, not just `str` objects. Generalize `ZipFile`'s methods so code using `pathlib.Path` with `ZipFile` type-checks. I verified (using my own project) that the following methods work with os.PurePath at runtime on CPython 3.6: * zipfile.ZipInfo.__init__ * zipfile.ZipInfo.extractall * zipfile.ZipInfo.write