@@ -242,13 +242,12 @@ def open(
242242 pax_headers : Mapping [str , str ] | None = ...,
243243 debug : int | None = ...,
244244 errorlevel : int | None = ...,
245- preset : int | None = ...,
246245) -> TarFile : ...
247246@overload
248247def open (
249248 name : StrOrBytesPath | WriteableBuffer | None = None ,
250249 * ,
251- mode : Literal ["w|" , "w|gz" , "w|bz2" , "w| xz" ],
250+ mode : Literal ["w|" , "w|xz" ],
252251 fileobj : IO [bytes ] | None = None ,
253252 bufsize : int = 10240 ,
254253 format : int | None = ...,
@@ -260,7 +259,24 @@ def open(
260259 pax_headers : Mapping [str , str ] | None = ...,
261260 debug : int | None = ...,
262261 errorlevel : int | None = ...,
263- preset : int | None = ...,
262+ ) -> TarFile : ...
263+ @overload
264+ def open (
265+ name : StrOrBytesPath | WriteableBuffer | None = None ,
266+ * ,
267+ mode : Literal ["w|gz" , "w|bz2" ],
268+ fileobj : IO [bytes ] | None = None ,
269+ bufsize : int = 10240 ,
270+ format : int | None = ...,
271+ tarinfo : type [TarInfo ] | None = ...,
272+ dereference : bool | None = ...,
273+ ignore_zeros : bool | None = ...,
274+ encoding : str | None = ...,
275+ errors : str = ...,
276+ pax_headers : Mapping [str , str ] | None = ...,
277+ debug : int | None = ...,
278+ errorlevel : int | None = ...,
279+ compresslevel : int = 9 ,
264280) -> TarFile : ...
265281
266282class ExFileObject (io .BufferedReader ):
0 commit comments