mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-27 05:12:10 +08:00
Simplify __all__ for modules beginning with 'm' to 't' (#8028)
This commit is contained in:
181
stdlib/types.pyi
181
stdlib/types.pyi
@@ -20,149 +20,46 @@ from importlib.machinery import ModuleSpec
|
||||
from typing import Any, ClassVar, Generic, Mapping, TypeVar, overload # noqa: Y027
|
||||
from typing_extensions import Literal, ParamSpec, final
|
||||
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
__all__ += [
|
||||
"BuiltinMethodType",
|
||||
"ClassMethodDescriptorType",
|
||||
"MethodDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"WrapperDescriptorType",
|
||||
"resolve_bases",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
__all__ += ["CellType"]
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ += ["GenericAlias"]
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"CellType",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"BuiltinMethodType",
|
||||
"WrapperDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"MethodDescriptorType",
|
||||
"ClassMethodDescriptorType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"resolve_bases",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
"GenericAlias",
|
||||
"UnionType",
|
||||
"EllipsisType",
|
||||
"NoneType",
|
||||
"NotImplementedType",
|
||||
]
|
||||
elif sys.version_info >= (3, 9):
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"CellType",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"BuiltinMethodType",
|
||||
"WrapperDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"MethodDescriptorType",
|
||||
"ClassMethodDescriptorType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"resolve_bases",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
"GenericAlias",
|
||||
]
|
||||
elif sys.version_info >= (3, 8):
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"CellType",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"BuiltinMethodType",
|
||||
"WrapperDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"MethodDescriptorType",
|
||||
"ClassMethodDescriptorType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"resolve_bases",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
]
|
||||
elif sys.version_info >= (3, 7):
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"BuiltinMethodType",
|
||||
"WrapperDescriptorType",
|
||||
"MethodWrapperType",
|
||||
"MethodDescriptorType",
|
||||
"ClassMethodDescriptorType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"resolve_bases",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"FunctionType",
|
||||
"LambdaType",
|
||||
"CodeType",
|
||||
"MappingProxyType",
|
||||
"SimpleNamespace",
|
||||
"GeneratorType",
|
||||
"CoroutineType",
|
||||
"AsyncGeneratorType",
|
||||
"MethodType",
|
||||
"BuiltinFunctionType",
|
||||
"ModuleType",
|
||||
"TracebackType",
|
||||
"FrameType",
|
||||
"GetSetDescriptorType",
|
||||
"MemberDescriptorType",
|
||||
"new_class",
|
||||
"prepare_class",
|
||||
"DynamicClassAttribute",
|
||||
"coroutine",
|
||||
]
|
||||
__all__ += ["EllipsisType", "NoneType", "NotImplementedType", "UnionType"]
|
||||
|
||||
# Note, all classes "defined" here require special handling.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user