mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Simplify __all__ definitions in modules beginning with 'a' to 'l' (#8026)
This commit is contained in:
@@ -3,47 +3,28 @@ from collections.abc import Callable, Generator, Iterable, Sequence
|
||||
from typing import IO, Any, Generic, NewType, NoReturn, Pattern, Protocol, TypeVar, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"ArgumentParser",
|
||||
"ArgumentError",
|
||||
"ArgumentTypeError",
|
||||
"FileType",
|
||||
"HelpFormatter",
|
||||
"ArgumentDefaultsHelpFormatter",
|
||||
"RawDescriptionHelpFormatter",
|
||||
"RawTextHelpFormatter",
|
||||
"MetavarTypeHelpFormatter",
|
||||
"Namespace",
|
||||
"Action",
|
||||
"ONE_OR_MORE",
|
||||
"OPTIONAL",
|
||||
"PARSER",
|
||||
"REMAINDER",
|
||||
"SUPPRESS",
|
||||
"ZERO_OR_MORE",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = [
|
||||
"ArgumentParser",
|
||||
"ArgumentError",
|
||||
"ArgumentTypeError",
|
||||
"BooleanOptionalAction",
|
||||
"FileType",
|
||||
"HelpFormatter",
|
||||
"ArgumentDefaultsHelpFormatter",
|
||||
"RawDescriptionHelpFormatter",
|
||||
"RawTextHelpFormatter",
|
||||
"MetavarTypeHelpFormatter",
|
||||
"Namespace",
|
||||
"Action",
|
||||
"ONE_OR_MORE",
|
||||
"OPTIONAL",
|
||||
"PARSER",
|
||||
"REMAINDER",
|
||||
"SUPPRESS",
|
||||
"ZERO_OR_MORE",
|
||||
]
|
||||
else:
|
||||
__all__ = [
|
||||
"ArgumentParser",
|
||||
"ArgumentError",
|
||||
"ArgumentTypeError",
|
||||
"FileType",
|
||||
"HelpFormatter",
|
||||
"ArgumentDefaultsHelpFormatter",
|
||||
"RawDescriptionHelpFormatter",
|
||||
"RawTextHelpFormatter",
|
||||
"MetavarTypeHelpFormatter",
|
||||
"Namespace",
|
||||
"Action",
|
||||
"ONE_OR_MORE",
|
||||
"OPTIONAL",
|
||||
"PARSER",
|
||||
"REMAINDER",
|
||||
"SUPPRESS",
|
||||
"ZERO_OR_MORE",
|
||||
]
|
||||
__all__ += ["BooleanOptionalAction"]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_ActionT = TypeVar("_ActionT", bound=Action)
|
||||
|
||||
Reference in New Issue
Block a user