@@ -8,7 +8,7 @@ import sys
8
8
9
9
10
10
if sys .version_info >= (3 , 6 ):
11
- _Path = Union [os .PathLike [Text ], Text ]
11
+ _Path = Union [os .PathLike [str ], str ]
12
12
else :
13
13
_Path = Text
14
14
_SZI = Union [Text , ZipInfo ]
@@ -51,8 +51,30 @@ class ZipFile:
51
51
fp : IO [bytes ]
52
52
NameToInfo : Dict [Text , ZipInfo ]
53
53
start_dir : int # undocumented
54
- def __init__ (self , file : Union [_Path , IO [bytes ]], mode : Text = ..., compression : int = ...,
55
- allowZip64 : bool = ...) -> None : ...
54
+ if sys .version_info >= (3 , 8 ):
55
+ def __init__ (
56
+ self ,
57
+ file : Union [_Path , IO [bytes ]],
58
+ mode : Text = ...,
59
+ compression : int = ...,
60
+ allowZip64 : bool = ...,
61
+ compresslevel : Optional [int ] = ...,
62
+ * ,
63
+ strict_timestamps : bool = ...,
64
+ ) -> None : ...
65
+ elif sys .version_info >= (3 , 7 ):
66
+ def __init__ (
67
+ self ,
68
+ file : Union [_Path , IO [bytes ]],
69
+ mode : Text = ...,
70
+ compression : int = ...,
71
+ allowZip64 : bool = ...,
72
+ compresslevel : Optional [int ] = ...,
73
+ ) -> None : ...
74
+ else :
75
+ def __init__ (
76
+ self , file : Union [_Path , IO [bytes ]], mode : Text = ..., compression : int = ..., allowZip64 : bool = ...,
77
+ ) -> None : ...
56
78
def __enter__ (self ) -> ZipFile : ...
57
79
def __exit__ (self , exc_type : Optional [Type [BaseException ]],
58
80
exc_val : Optional [BaseException ],
0 commit comments