diff options
| author | Eric Lin <anselor@gmail.com> | 2021-03-29 15:27:03 -0400 |
|---|---|---|
| committer | anselor <anselor@gmail.com> | 2021-04-02 18:00:03 -0400 |
| commit | f90db5595c101d7613120cf2bf5d9d98e621aad9 (patch) | |
| tree | c49d789b0cac679de383437846225f4f3aa9748e /cmd2 | |
| parent | 5165edec890575682f345fc42f5a53e10ed575b9 (diff) | |
| download | cmd2-git-f90db5595c101d7613120cf2bf5d9d98e621aad9.tar.gz | |
MyPy strict checking doesn't allow implicit exports. Must explicitly export in __init__.py
Diffstat (limited to 'cmd2')
| -rw-r--r-- | cmd2/__init__.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/cmd2/__init__.py b/cmd2/__init__.py index 4bc73dbe..34b16396 100644 --- a/cmd2/__init__.py +++ b/cmd2/__init__.py @@ -15,6 +15,8 @@ except importlib_metadata.PackageNotFoundError: # pragma: no cover # package is not installed pass +from typing import List + from .ansi import style, fg, bg from .argparse_custom import Cmd2ArgumentParser, Cmd2AttributeWrapper, CompletionItem, set_default_argument_parser @@ -38,3 +40,42 @@ from . import plugin from .parsing import Statement from .py_bridge import CommandResult from .utils import categorize, CompletionMode, CustomCompletionSettings, Settable + + +__all__: List[str] = [ + 'COMMAND_NAME', + 'DEFAULT_ARGUMENT_PARSER', + 'DEFAULT_SHORTCUTS', + # ANSI Style exports + 'bg', + 'fg', + 'style', + # Argparse Exports + 'Cmd2ArgumentParser', + 'Cmd2AttributeWrapper', + 'CompletionItem', + 'set_default_argument_parser', + # Cmd2 + 'Cmd', + 'CommandResult', + 'CommandSet', + 'Statement', + # Decorators + 'with_argument_list', + 'with_argparser', + 'with_category', + 'with_default_category', + 'as_subcommand_to', + # Exceptions + 'Cmd2ArgparseError', + 'CommandSetRegistrationError', + 'CompletionError', + 'SkipPostcommandHooks', + # modules + 'plugin', + # Utilities + 'categorize', + 'CompletionMode', + 'CustomCompletionSettings', + 'Settable', +] |
