@@ -304,6 +304,25 @@ class TarFile:
304
304
) -> Self : ...
305
305
@overload
306
306
@classmethod
307
+ def open (
308
+ cls ,
309
+ name : StrOrBytesPath | ReadableBuffer | None ,
310
+ mode : Literal ["r|*" , "r|" , "r|gz" , "r|bz2" , "r|xz" ],
311
+ fileobj : _Fileobj | None = None ,
312
+ bufsize : int = 10240 ,
313
+ * ,
314
+ format : int | None = ...,
315
+ tarinfo : type [TarInfo ] | None = ...,
316
+ dereference : bool | None = ...,
317
+ ignore_zeros : bool | None = ...,
318
+ encoding : str | None = ...,
319
+ errors : str = ...,
320
+ pax_headers : Mapping [str , str ] | None = ...,
321
+ debug : int | None = ...,
322
+ errorlevel : int | None = ...,
323
+ ) -> Self : ...
324
+ @overload
325
+ @classmethod
307
326
def open (
308
327
cls ,
309
328
name : StrOrBytesPath | ReadableBuffer | None = None ,
@@ -323,6 +342,25 @@ class TarFile:
323
342
) -> Self : ...
324
343
@overload
325
344
@classmethod
345
+ def open (
346
+ cls ,
347
+ name : StrOrBytesPath | WriteableBuffer | None ,
348
+ mode : Literal ["w|" , "w|xz" ],
349
+ fileobj : _Fileobj | None = None ,
350
+ bufsize : int = 10240 ,
351
+ * ,
352
+ format : int | None = ...,
353
+ tarinfo : type [TarInfo ] | None = ...,
354
+ dereference : bool | None = ...,
355
+ ignore_zeros : bool | None = ...,
356
+ encoding : str | None = ...,
357
+ errors : str = ...,
358
+ pax_headers : Mapping [str , str ] | None = ...,
359
+ debug : int | None = ...,
360
+ errorlevel : int | None = ...,
361
+ ) -> Self : ...
362
+ @overload
363
+ @classmethod
326
364
def open (
327
365
cls ,
328
366
name : StrOrBytesPath | WriteableBuffer | None = None ,
@@ -342,6 +380,26 @@ class TarFile:
342
380
) -> Self : ...
343
381
@overload
344
382
@classmethod
383
+ def open (
384
+ cls ,
385
+ name : StrOrBytesPath | WriteableBuffer | None ,
386
+ mode : Literal ["w|gz" , "w|bz2" ],
387
+ fileobj : _Fileobj | None = None ,
388
+ bufsize : int = 10240 ,
389
+ * ,
390
+ format : int | None = ...,
391
+ tarinfo : type [TarInfo ] | None = ...,
392
+ dereference : bool | None = ...,
393
+ ignore_zeros : bool | None = ...,
394
+ encoding : str | None = ...,
395
+ errors : str = ...,
396
+ pax_headers : Mapping [str , str ] | None = ...,
397
+ debug : int | None = ...,
398
+ errorlevel : int | None = ...,
399
+ compresslevel : int = 9 ,
400
+ ) -> Self : ...
401
+ @overload
402
+ @classmethod
345
403
def open (
346
404
cls ,
347
405
name : StrOrBytesPath | WriteableBuffer | None = None ,
0 commit comments