mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Add __all__ for modules beginning with 'c' and 'd' (#7303)
This commit is contained in:
@@ -11,6 +11,38 @@ if sys.version_info >= (3, 9):
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
|
||||
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",
|
||||
]
|
||||
|
||||
# define _MISSING_TYPE as an enum within the type stubs,
|
||||
# even though that is not really its type at runtime
|
||||
# this allows us to use Literal[_MISSING_TYPE.MISSING]
|
||||
|
||||
Reference in New Issue
Block a user