mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-24 20:12:08 +08:00
Use "all +=" instead of duplicating the branches (#7865)
This commit is contained in:
@@ -7,37 +7,23 @@ from types import TracebackType
|
||||
from typing import IO, Any, Protocol, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"BadZipFile",
|
||||
"BadZipfile",
|
||||
"error",
|
||||
"ZIP_STORED",
|
||||
"ZIP_DEFLATED",
|
||||
"ZIP_BZIP2",
|
||||
"ZIP_LZMA",
|
||||
"is_zipfile",
|
||||
"ZipInfo",
|
||||
"ZipFile",
|
||||
"PyZipFile",
|
||||
"LargeZipFile",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
__all__ = [
|
||||
"BadZipFile",
|
||||
"BadZipfile",
|
||||
"error",
|
||||
"ZIP_STORED",
|
||||
"ZIP_DEFLATED",
|
||||
"ZIP_BZIP2",
|
||||
"ZIP_LZMA",
|
||||
"is_zipfile",
|
||||
"ZipInfo",
|
||||
"ZipFile",
|
||||
"PyZipFile",
|
||||
"LargeZipFile",
|
||||
"Path",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"BadZipFile",
|
||||
"BadZipfile",
|
||||
"error",
|
||||
"ZIP_STORED",
|
||||
"ZIP_DEFLATED",
|
||||
"ZIP_BZIP2",
|
||||
"ZIP_LZMA",
|
||||
"is_zipfile",
|
||||
"ZipInfo",
|
||||
"ZipFile",
|
||||
"PyZipFile",
|
||||
"LargeZipFile",
|
||||
]
|
||||
__all__ += ["Path"]
|
||||
|
||||
_DateTuple: TypeAlias = tuple[int, int, int, int, int, int]
|
||||
_ReadWriteMode: TypeAlias = Literal["r", "w"]
|
||||
|
||||
Reference in New Issue
Block a user