Simplify __all__ for modules beginning with 'm' to 't' (#8028)

This commit is contained in:
Alex Waygood
2022-06-07 20:14:15 +01:00
committed by GitHub
parent b88ea4a499
commit 591593c85f
15 changed files with 620 additions and 1626 deletions

View File

@@ -10,86 +10,35 @@ _TF: TypeAlias = Callable[[FrameType, str, Any], Callable[..., Any] | None]
_PF: TypeAlias = Callable[[FrameType, str, Any], None]
_T = TypeVar("_T")
__all__ = [
"get_ident",
"active_count",
"Condition",
"current_thread",
"enumerate",
"main_thread",
"TIMEOUT_MAX",
"Event",
"Lock",
"RLock",
"Semaphore",
"BoundedSemaphore",
"Thread",
"Barrier",
"BrokenBarrierError",
"Timer",
"ThreadError",
"setprofile",
"settrace",
"local",
"stack_size",
]
if sys.version_info >= (3, 8):
__all__ += ["ExceptHookArgs", "excepthook", "get_native_id"]
if sys.version_info >= (3, 10):
__all__ = [
"get_ident",
"active_count",
"Condition",
"current_thread",
"enumerate",
"main_thread",
"TIMEOUT_MAX",
"Event",
"Lock",
"RLock",
"Semaphore",
"BoundedSemaphore",
"Thread",
"Barrier",
"BrokenBarrierError",
"Timer",
"ThreadError",
"setprofile",
"settrace",
"local",
"stack_size",
"excepthook",
"ExceptHookArgs",
"gettrace",
"getprofile",
"get_native_id",
]
elif sys.version_info >= (3, 8):
__all__ = [
"get_ident",
"active_count",
"Condition",
"current_thread",
"enumerate",
"main_thread",
"TIMEOUT_MAX",
"Event",
"Lock",
"RLock",
"Semaphore",
"BoundedSemaphore",
"Thread",
"Barrier",
"BrokenBarrierError",
"Timer",
"ThreadError",
"setprofile",
"settrace",
"local",
"stack_size",
"excepthook",
"ExceptHookArgs",
"get_native_id",
]
else:
__all__ = [
"get_ident",
"active_count",
"Condition",
"current_thread",
"enumerate",
"main_thread",
"TIMEOUT_MAX",
"Event",
"Lock",
"RLock",
"Semaphore",
"BoundedSemaphore",
"Thread",
"Barrier",
"BrokenBarrierError",
"Timer",
"ThreadError",
"setprofile",
"settrace",
"local",
"stack_size",
]
__all__ += ["getprofile", "gettrace"]
_profile_hook: _PF | None