From 0fda1f7f4eb93c8e13ac5382a9ab8eaafe6f9eef Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 14 Jan 2025 11:15:34 -0500 Subject: [PATCH] add `"w:tar"` as a mode for tarfile this is an alias for `"w:"` according to the code (which defaults the second segment to `"tar"`) --- stdlib/tarfile.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/tarfile.pyi b/stdlib/tarfile.pyi index a717c280a423..009aa9070aa8 100644 --- a/stdlib/tarfile.pyi +++ b/stdlib/tarfile.pyi @@ -123,7 +123,7 @@ def open( @overload def open( name: StrOrBytesPath | None, - mode: Literal["x", "x:", "a", "a:", "w", "w:"], + mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"], fileobj: _Fileobj | None = None, bufsize: int = 10240, *, @@ -141,7 +141,7 @@ def open( def open( name: StrOrBytesPath | None = None, *, - mode: Literal["x", "x:", "a", "a:", "w", "w:"], + mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"], fileobj: _Fileobj | None = None, bufsize: int = 10240, format: int | None = ...,