mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Simplify __all__ definitions in modules beginning with 'a' to 'l' (#8026)
This commit is contained in:
@@ -12,37 +12,23 @@ if sys.version_info >= (3, 9):
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
|
||||
__all__ = [
|
||||
"dataclass",
|
||||
"field",
|
||||
"Field",
|
||||
"FrozenInstanceError",
|
||||
"InitVar",
|
||||
"MISSING",
|
||||
"fields",
|
||||
"asdict",
|
||||
"astuple",
|
||||
"make_dataclass",
|
||||
"replace",
|
||||
"is_dataclass",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
__all__ = [
|
||||
"dataclass",
|
||||
"field",
|
||||
"Field",
|
||||
"FrozenInstanceError",
|
||||
"InitVar",
|
||||
"KW_ONLY",
|
||||
"MISSING",
|
||||
"fields",
|
||||
"asdict",
|
||||
"astuple",
|
||||
"make_dataclass",
|
||||
"replace",
|
||||
"is_dataclass",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"dataclass",
|
||||
"field",
|
||||
"Field",
|
||||
"FrozenInstanceError",
|
||||
"InitVar",
|
||||
"MISSING",
|
||||
"fields",
|
||||
"asdict",
|
||||
"astuple",
|
||||
"make_dataclass",
|
||||
"replace",
|
||||
"is_dataclass",
|
||||
]
|
||||
__all__ += ["KW_ONLY"]
|
||||
|
||||
# define _MISSING_TYPE as an enum within the type stubs,
|
||||
# even though that is not really its type at runtime
|
||||
|
||||
Reference in New Issue
Block a user