FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cmd2/cmd2/__init__.py at main · python-cmd2/cmd2 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
python-cmd2
/
cmd2
Public
Notifications
You must be signed in to change notification settings
Fork
132
Star
686
Code
Issues
1
Pull requests
2
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cmd2
/
cmd2
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
132 lines (128 loc) · 2.86 KB
Breadcrumbs
cmd2
/
cmd2
/
__init__.py
Copy path
File metadata and controls
132 lines (128 loc) · 2.86 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
"""Import certain things for backwards compatibility."""
import
contextlib
import
importlib
.
metadata
as
importlib_metadata
with
contextlib
.
suppress
(
importlib_metadata
.
PackageNotFoundError
):
__version__
=
importlib_metadata
.
version
(
__name__
)
from
.
import
(
plugin
,
rich_utils
,
string_utils
,
)
from
.
annotated
import
(
ArgumentBlock
,
with_annotated
,
)
from
.
argparse_completer
import
set_default_argparse_completer
from
.
argparse_utils
import
(
Cmd2ArgumentParser
,
SubcommandRecord
,
register_argparse_argument_parameter
,
set_default_argument_parser
,
)
from
.
cmd2
import
Cmd
from
.
colors
import
Color
from
.
command_set
import
CommandSet
from
.
completion
import
(
Choices
,
CompletionItem
,
Completions
,
)
from
.
constants
import
(
COMMAND_NAME
,
DEFAULT_SHORTCUTS
,
)
from
.
decorators
import
(
as_subcommand_to
,
with_argparser
,
with_argument_list
,
with_category
,
)
from
.
exceptions
import
(
Cmd2ArgparseError
,
CommandSetRegistrationError
,
CompletionError
,
PassThroughException
,
SkipPostcommandHooks
,
)
from
.
parsing
import
Statement
from
.
py_bridge
import
CommandResult
from
.
rich_utils
import
(
ArgumentDefaultsCmd2HelpFormatter
,
Cmd2HelpFormatter
,
MetavarTypeCmd2HelpFormatter
,
RawDescriptionCmd2HelpFormatter
,
RawTextCmd2HelpFormatter
,
TextGroup
,
)
from
.
string_utils
import
stylize
from
.
styles
import
Cmd2Style
from
.
theme
import
(
get_theme
,
reset_theme
,
update_theme
,
)
from
.
utils
import
(
CustomCompletionSettings
,
Settable
,
categorize
,
set_default_str_sort_key
,
)
__all__
:
list
[
str
]
=
[
# noqa: RUF022
"COMMAND_NAME"
,
"DEFAULT_SHORTCUTS"
,
# Argparse Exports
"Cmd2ArgumentParser"
,
"SubcommandRecord"
,
"register_argparse_argument_parameter"
,
"set_default_argparse_completer"
,
"set_default_argument_parser"
,
# Cmd2
"Cmd"
,
"CommandResult"
,
"CommandSet"
,
"Statement"
,
# Colors
"Color"
,
# Completion
"Choices"
,
"CompletionItem"
,
"Completions"
,
# Annotated commands
"ArgumentBlock"
,
# Decorators
"with_annotated"
,
"with_argument_list"
,
"with_argparser"
,
"with_category"
,
"as_subcommand_to"
,
# Exceptions
"Cmd2ArgparseError"
,
"CommandSetRegistrationError"
,
"CompletionError"
,
"PassThroughException"
,
"SkipPostcommandHooks"
,
# modules
"plugin"
,
"rich_utils"
,
"string_utils"
,
# Rich Utils
"ArgumentDefaultsCmd2HelpFormatter"
,
"Cmd2HelpFormatter"
,
"MetavarTypeCmd2HelpFormatter"
,
"RawDescriptionCmd2HelpFormatter"
,
"RawTextCmd2HelpFormatter"
,
"TextGroup"
,
# String Utils
"stylize"
,
# Styles
"Cmd2Style"
,
# Theme
"get_theme"
,
"reset_theme"
,
"update_theme"
,
# Utilities
"categorize"
,
"CustomCompletionSettings"
,
"Settable"
,
"set_default_str_sort_key"
,
]
Back
|
FazBrowse Home
|
New Git URL