Simplify __all__ definitions in modules beginning with 'a' to 'l' (#8026)

This commit is contained in:
Alex Waygood
2022-06-07 14:40:48 +01:00
committed by GitHub
parent 214bf15dce
commit e88a182573
17 changed files with 419 additions and 883 deletions

View File

@@ -8,52 +8,25 @@ from typing_extensions import Literal, TypeAlias, final
if sys.version_info >= (3, 9):
from types import GenericAlias
__all__ = [
"update_wrapper",
"wraps",
"WRAPPER_ASSIGNMENTS",
"WRAPPER_UPDATES",
"total_ordering",
"cache",
"cmp_to_key",
"lru_cache",
"reduce",
"partial",
"partialmethod",
"singledispatch",
"singledispatchmethod",
"cached_property",
]
elif sys.version_info >= (3, 8):
__all__ = [
"update_wrapper",
"wraps",
"WRAPPER_ASSIGNMENTS",
"WRAPPER_UPDATES",
"total_ordering",
"cmp_to_key",
"lru_cache",
"reduce",
"partial",
"partialmethod",
"singledispatch",
"singledispatchmethod",
"cached_property",
]
else:
__all__ = [
"update_wrapper",
"wraps",
"WRAPPER_ASSIGNMENTS",
"WRAPPER_UPDATES",
"total_ordering",
"cmp_to_key",
"lru_cache",
"reduce",
"partial",
"partialmethod",
"singledispatch",
]
__all__ = [
"update_wrapper",
"wraps",
"WRAPPER_ASSIGNMENTS",
"WRAPPER_UPDATES",
"total_ordering",
"cmp_to_key",
"lru_cache",
"reduce",
"partial",
"partialmethod",
"singledispatch",
]
if sys.version_info >= (3, 8):
__all__ += ["cached_property", "singledispatchmethod"]
if sys.version_info >= (3, 9):
__all__ += ["cache"]
_AnyCallable: TypeAlias = Callable[..., Any]