Simplify __all__ definitions in modules beginning with 'a' to 'l' (#8026)

This commit is contained in:
Alex Waygood
2022-06-07 14:40:48 +01:00
committed by GitHub
parent 214bf15dce
commit e88a182573
17 changed files with 419 additions and 883 deletions

View File

@@ -7,38 +7,31 @@ from collections.abc import Iterable, Iterator, Mapping
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Literal, TypeAlias
__all__ = ["EnumMeta", "Enum", "IntEnum", "Flag", "IntFlag", "auto", "unique"]
if sys.version_info >= (3, 11):
__all__ = [
__all__ += [
"CONFORM",
"CONTINUOUS",
"EJECT",
"EnumCheck",
"EnumType",
"EnumMeta",
"Enum",
"IntEnum",
"StrEnum",
"Flag",
"IntFlag",
"FlagBoundary",
"KEEP",
"NAMED_FLAGS",
"ReprEnum",
"auto",
"unique",
"property",
"verify",
"STRICT",
"StrEnum",
"UNIQUE",
"global_enum",
"global_enum_repr",
"global_flag_repr",
"global_str",
"member",
"nonmember",
"FlagBoundary",
"STRICT",
"CONFORM",
"EJECT",
"KEEP",
"global_flag_repr",
"global_enum_repr",
"global_str",
"global_enum",
"EnumCheck",
"CONTINUOUS",
"NAMED_FLAGS",
"UNIQUE",
"property",
"verify",
]
else:
__all__ = ["EnumMeta", "Enum", "IntEnum", "Flag", "IntFlag", "auto", "unique"]
_EnumMemberT = TypeVar("_EnumMemberT")
_EnumerationT = TypeVar("_EnumerationT", bound=type[Enum])