mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add __all__ for most modules beginning with 't' (#7373)
This commit is contained in:
146
stdlib/types.pyi
146
stdlib/types.pyi
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user