[tarfile] Fix some TarFile attributes to be non-optional (#15367)

This commit is contained in:
Erik Montnemery
2026-02-04 09:20:09 +01:00
committed by GitHub
parent f7619a4e5b
commit 516eed0d5f
+6 -6
View File
@@ -119,16 +119,16 @@ class TarFile:
OPEN_METH: ClassVar[Mapping[str, str]]
name: StrOrBytesPath | None
mode: Literal["r", "a", "w", "x"]
fileobj: _Fileobj | None
format: _TarFormat | None
fileobj: _Fileobj
format: _TarFormat
tarinfo: type[TarInfo]
dereference: bool | None
ignore_zeros: bool | None
encoding: str | None
dereference: bool
ignore_zeros: bool
encoding: str
errors: str
fileobject: type[ExFileObject] # undocumented
pax_headers: Mapping[str, str]
debug: int | None
debug: int
errorlevel: int
offset: int # undocumented
extraction_filter: _FilterFunction | None