|
1 | 1 | import io
|
2 | 2 | import sys
|
3 |
| -from _typeshed import Self, StrOrBytesPath, StrPath |
| 3 | +from _typeshed import Self, StrOrBytesPath, StrPath, _BufferWithLen |
4 | 4 | from collections.abc import Callable, Iterable, Iterator
|
5 | 5 | from os import PathLike
|
6 | 6 | from types import TracebackType
|
@@ -103,7 +103,7 @@ class ZipFile:
|
103 | 103 | compression: int # undocumented
|
104 | 104 | compresslevel: int | None # undocumented
|
105 | 105 | mode: _ZipFileMode # undocumented
|
106 |
| - pwd: str | None # undocumented |
| 106 | + pwd: bytes | None # undocumented |
107 | 107 | if sys.version_info >= (3, 11):
|
108 | 108 | @overload
|
109 | 109 | def __init__(
|
@@ -173,7 +173,11 @@ class ZipFile:
|
173 | 173 | self, filename: StrPath, arcname: StrPath | None = ..., compress_type: int | None = ..., compresslevel: int | None = ...
|
174 | 174 | ) -> None: ...
|
175 | 175 | def writestr(
|
176 |
| - self, zinfo_or_arcname: str | ZipInfo, data: bytes | str, compress_type: int | None = ..., compresslevel: int | None = ... |
| 176 | + self, |
| 177 | + zinfo_or_arcname: str | ZipInfo, |
| 178 | + data: _BufferWithLen | str, |
| 179 | + compress_type: int | None = ..., |
| 180 | + compresslevel: int | None = ..., |
177 | 181 | ) -> None: ...
|
178 | 182 | if sys.version_info >= (3, 11):
|
179 | 183 | def mkdir(self, zinfo_or_directory_name: str | ZipInfo, mode: int = ...) -> None: ...
|
|
0 commit comments