Add __all__ for most modules beginning with 't' (#7373)

This commit is contained in:
Alex Waygood
2022-02-24 02:25:28 +00:00
committed by GitHub
parent 062fc75d73
commit 6a743348ca
22 changed files with 1192 additions and 0 deletions

View File

@@ -22,6 +22,152 @@ from typing import (
)
from typing_extensions import Literal, ParamSpec, final
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",
"ClassMethodDescriptorType",
"ModuleType",
"TracebackType",
"FrameType",
"GetSetDescriptorType",
"MemberDescriptorType",
"new_class",
"resolve_bases",
"prepare_class",
"DynamicClassAttribute",
"coroutine",
]
# Note, all classes "defined" here require special handling.
_T1 = TypeVar("_T1")