|
38 | 38 | import re |
39 | 39 | import sys |
40 | 40 | import threading |
41 | | -from code import InteractiveConsole |
42 | | -from collections import namedtuple |
43 | | -from contextlib import redirect_stdout |
44 | | -from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type, Union |
45 | | - |
46 | | -from . import ansi, constants, plugin, utils |
47 | | -from .argparse_custom import DEFAULT_ARGUMENT_PARSER, CompletionItem |
48 | | -from .clipboard import can_clip, get_paste_buffer, write_to_paste_buffer |
49 | | -from .command_definition import CommandSet |
50 | | -from .constants import CLASS_ATTR_DEFAULT_HELP_CATEGORY, COMMAND_FUNC_PREFIX, COMPLETER_FUNC_PREFIX, HELP_FUNC_PREFIX |
51 | | -from .decorators import with_argparser, as_subcommand_to |
| 41 | +from code import ( |
| 42 | + InteractiveConsole, |
| 43 | +) |
| 44 | +from collections import ( |
| 45 | + namedtuple, |
| 46 | +) |
| 47 | +from contextlib import ( |
| 48 | + redirect_stdout, |
| 49 | +) |
| 50 | +from typing import ( |
| 51 | + Any, |
| 52 | + Callable, |
| 53 | + Dict, |
| 54 | + Iterable, |
| 55 | + List, |
| 56 | + Mapping, |
| 57 | + Optional, |
| 58 | + Tuple, |
| 59 | + Type, |
| 60 | + Union, |
| 61 | +) |
| 62 | + |
| 63 | +from . import ( |
| 64 | + ansi, |
| 65 | + constants, |
| 66 | + plugin, |
| 67 | + utils, |
| 68 | +) |
| 69 | +from .argparse_custom import ( |
| 70 | + DEFAULT_ARGUMENT_PARSER, |
| 71 | + CompletionItem, |
| 72 | +) |
| 73 | +from .clipboard import ( |
| 74 | + can_clip, |
| 75 | + get_paste_buffer, |
| 76 | + write_to_paste_buffer, |
| 77 | +) |
| 78 | +from .command_definition import ( |
| 79 | + CommandSet, |
| 80 | +) |
| 81 | +from .constants import ( |
| 82 | + CLASS_ATTR_DEFAULT_HELP_CATEGORY, |
| 83 | + COMMAND_FUNC_PREFIX, |
| 84 | + COMPLETER_FUNC_PREFIX, |
| 85 | + HELP_FUNC_PREFIX, |
| 86 | +) |
| 87 | +from .decorators import ( |
| 88 | + as_subcommand_to, |
| 89 | + with_argparser, |
| 90 | +) |
52 | 91 | from .exceptions import ( |
53 | | - CommandSetRegistrationError, |
54 | 92 | Cmd2ShlexError, |
| 93 | + CommandSetRegistrationError, |
55 | 94 | EmbeddedConsoleExit, |
56 | 95 | EmptyStatement, |
57 | 96 | RedirectionError, |
58 | | - SkipPostcommandHooks |
| 97 | + SkipPostcommandHooks, |
| 98 | +) |
| 99 | +from .history import ( |
| 100 | + History, |
| 101 | + HistoryItem, |
| 102 | +) |
| 103 | +from .parsing import ( |
| 104 | + Macro, |
| 105 | + MacroArg, |
| 106 | + Statement, |
| 107 | + StatementParser, |
| 108 | + shlex_split, |
| 109 | +) |
| 110 | +from .rl_utils import ( |
| 111 | + RlType, |
| 112 | + rl_get_point, |
| 113 | + rl_make_safe_prompt, |
| 114 | + rl_set_prompt, |
| 115 | + rl_type, |
| 116 | + rl_warning, |
| 117 | + vt100_support, |
| 118 | +) |
| 119 | +from .utils import ( |
| 120 | + CompletionError, |
| 121 | + Settable, |
| 122 | + get_defining_class, |
59 | 123 | ) |
60 | | -from .history import History, HistoryItem |
61 | | -from .parsing import Macro, MacroArg, Statement, StatementParser, shlex_split |
62 | | -from .rl_utils import RlType, rl_get_point, rl_make_safe_prompt, rl_set_prompt, rl_type, rl_warning, vt100_support |
63 | | -from .utils import CompletionError, get_defining_class, Settable |
64 | 124 |
|
65 | 125 | # Set up readline |
66 | 126 | if rl_type == RlType.NONE: # pragma: no cover |
|
0 commit comments