Skip to content

Commit 86ebca9

Browse files
committed
[tarfile] Use Literal for TarFile.{debug,errorlevel}
1 parent 516eed0 commit 86ebca9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/tarfile.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ class TarFile:
128128
errors: str
129129
fileobject: type[ExFileObject] # undocumented
130130
pax_headers: Mapping[str, str]
131-
debug: int
132-
errorlevel: int
131+
debug: Literal[0, 1, 2, 3]
132+
errorlevel: Literal[0, 1, 2]
133133
offset: int # undocumented
134134
extraction_filter: _FilterFunction | None
135135
if sys.version_info >= (3, 13):
@@ -146,8 +146,8 @@ class TarFile:
146146
encoding: str | None = None,
147147
errors: str = "surrogateescape",
148148
pax_headers: Mapping[str, str] | None = None,
149-
debug: int | None = None,
150-
errorlevel: int | None = None,
149+
debug: Literal[0, 1, 2, 3] | None = None, # default 0
150+
errorlevel: Literal[0, 1, 2] | None = None, # default 1
151151
copybufsize: int | None = None, # undocumented
152152
stream: bool = False,
153153
) -> None: ...

0 commit comments

Comments
 (0)