Skip to content

Commit 4b40d77

Browse files
committed
Reformatted some imports.
1 parent 9630d92 commit 4b40d77

File tree

7 files changed

+26
-36
lines changed

7 files changed

+26
-36
lines changed

cmd2/command_definition.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Supports the definition of commands in separate classes to be composed into cmd2.Cmd."""
22

3-
from collections.abc import Callable, Mapping
3+
from collections.abc import (
4+
Callable,
5+
Mapping,
6+
)
47
from typing import (
58
TYPE_CHECKING,
69
TypeAlias,
@@ -11,9 +14,7 @@
1114
CLASS_ATTR_DEFAULT_HELP_CATEGORY,
1215
COMMAND_FUNC_PREFIX,
1316
)
14-
from .exceptions import (
15-
CommandSetRegistrationError,
16-
)
17+
from .exceptions import CommandSetRegistrationError
1718
from .utils import Settable
1819

1920
if TYPE_CHECKING: # pragma: no cover

cmd2/decorators.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""Decorators for ``cmd2`` commands."""
22

33
import argparse
4-
from collections.abc import Callable, Sequence
4+
from collections.abc import (
5+
Callable,
6+
Sequence,
7+
)
58
from typing import (
69
TYPE_CHECKING,
710
Any,
@@ -10,22 +13,14 @@
1013
Union,
1114
)
1215

13-
from . import (
14-
constants,
15-
)
16-
from .argparse_custom import (
17-
Cmd2AttributeWrapper,
18-
)
16+
from . import constants
17+
from .argparse_custom import Cmd2AttributeWrapper
1918
from .command_definition import (
2019
CommandFunc,
2120
CommandSet,
2221
)
23-
from .exceptions import (
24-
Cmd2ArgparseError,
25-
)
26-
from .parsing import (
27-
Statement,
28-
)
22+
from .exceptions import Cmd2ArgparseError
23+
from .parsing import Statement
2924

3025
if TYPE_CHECKING: # pragma: no cover
3126
import cmd2

cmd2/history.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
import json
44
import re
5-
from collections import (
6-
OrderedDict,
7-
)
8-
from collections.abc import Callable, Iterable
9-
from dataclasses import (
10-
dataclass,
5+
from collections import OrderedDict
6+
from collections.abc import (
7+
Callable,
8+
Iterable,
119
)
10+
from dataclasses import dataclass
1211
from typing import (
1312
Any,
1413
overload,

cmd2/plugin.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
"""Classes for the cmd2 lifecycle hooks that you can register multiple callback functions/methods with."""
22

3-
from dataclasses import (
4-
dataclass,
5-
)
3+
from dataclasses import dataclass
64

7-
from .parsing import (
8-
Statement,
9-
)
5+
from .parsing import Statement
106

117

128
@dataclass

cmd2/pt_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""Utilities for integrating prompt_toolkit with cmd2."""
22

33
import re
4-
from collections.abc import Callable, Iterable
4+
from collections.abc import (
5+
Callable,
6+
Iterable,
7+
)
58
from typing import (
69
TYPE_CHECKING,
710
Any,

cmd2/py_bridge.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
cast,
1515
)
1616

17-
from .utils import ( # namedtuple_with_defaults,
18-
StdSim,
19-
)
17+
from .utils import StdSim # namedtuple_with_defaults,
2018

2119
if TYPE_CHECKING: # pragma: no cover
2220
import cmd2

cmd2/transcript.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ class is used in cmd2.py::run_transcript_tests()
2222
from . import utils
2323

2424
if TYPE_CHECKING: # pragma: no cover
25-
from cmd2 import (
26-
Cmd,
27-
)
25+
from cmd2 import Cmd
2826

2927

3028
class Cmd2TestCase(unittest.TestCase):

0 commit comments

Comments
 (0)