We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5af7d3 commit 42080d5Copy full SHA for 42080d5
cmd2/command_definition.py
@@ -3,6 +3,7 @@
3
Supports the definition of commands in separate classes to be composed into cmd2.Cmd
4
"""
5
from typing import (
6
+ TYPE_CHECKING,
7
Callable,
8
Dict,
9
Mapping,
@@ -21,18 +22,8 @@
21
22
Settable,
23
)
24
-# Allows IDEs to resolve types without impacting imports at runtime, breaking circular dependency issues
25
-try: # pragma: no cover
26
- from typing import (
27
- TYPE_CHECKING,
28
- )
29
-
30
- if TYPE_CHECKING:
31
- import cmd2
32
33
-except ImportError: # pragma: no cover
34
- pass
35
+if TYPE_CHECKING:
+ import cmd2
36
37
#: Callable signature for a basic command function
38
#: Further refinements are needed to define the input parameters
0 commit comments