cloup 4.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cloup/__init__.py ADDED
@@ -0,0 +1,222 @@
1
+ """Top-level package for cloup."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ import click as _click
6
+
7
+ # WARNING: _version.py is generated by hatch-vcs upon package building/installation
8
+ from . import _version
9
+
10
+ __author__ = """Gianluca Gippetto"""
11
+ __email__ = "gianluca.gippetto@gmail.com"
12
+ __version__ = _version.version
13
+ __version_tuple__ = _version.version_tuple
14
+
15
+ from click import (
16
+ # core
17
+ Argument,
18
+ CommandCollection,
19
+ Parameter,
20
+ ParameterSource,
21
+ # decorators
22
+ confirmation_option,
23
+ custom_version_option,
24
+ help_option,
25
+ make_pass_decorator,
26
+ pass_obj,
27
+ password_option,
28
+ version_option,
29
+ # exceptions
30
+ Abort,
31
+ BadArgumentUsage,
32
+ BadOptionUsage,
33
+ BadParameter,
34
+ ClickException,
35
+ FileError,
36
+ MissingParameter,
37
+ NoSuchCommand,
38
+ NoSuchOption,
39
+ UsageError,
40
+ # formatting
41
+ wrap_text,
42
+ # termui
43
+ clear,
44
+ confirm,
45
+ echo_via_pager,
46
+ edit,
47
+ get_pager_file,
48
+ getchar,
49
+ launch,
50
+ pause,
51
+ progressbar,
52
+ prompt,
53
+ secho,
54
+ style,
55
+ unstyle,
56
+ # types
57
+ BOOL,
58
+ Choice,
59
+ DateTime,
60
+ File,
61
+ FLOAT,
62
+ FloatRange,
63
+ INT,
64
+ IntRange,
65
+ ParamType,
66
+ Path,
67
+ STRING,
68
+ Tuple,
69
+ UNPROCESSED,
70
+ UUID,
71
+ # utils
72
+ echo,
73
+ format_filename,
74
+ get_app_dir,
75
+ open_file,
76
+ )
77
+
78
+ # Click exposes these deprecated names lazily. Mirror that behavior so importing
79
+ # Cloup does not emit their deprecation warnings.
80
+ if TYPE_CHECKING:
81
+ from click.core import _BaseCommand as BaseCommand
82
+ from click.core import _MultiCommand as MultiCommand
83
+ from click.parser import _OptionParser as OptionParser
84
+ from click.utils import _get_binary_stream as get_binary_stream
85
+ from click.utils import _get_text_stream as get_text_stream
86
+ else:
87
+ _deprecated_click_names = {
88
+ "BaseCommand",
89
+ "MultiCommand",
90
+ "OptionParser",
91
+ "get_binary_stream",
92
+ "get_text_stream",
93
+ }
94
+
95
+ def __getattr__(name: str) -> object:
96
+ if name in _deprecated_click_names:
97
+ return getattr(_click, name)
98
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
99
+
100
+
101
+ from . import warnings as warnings
102
+ from .styling import (
103
+ HelpTheme,
104
+ Style,
105
+ Color,
106
+ )
107
+ from .formatting import (
108
+ HelpFormatter,
109
+ HelpSection,
110
+ )
111
+ from ._context import Context, get_current_context, pass_context
112
+ from ._params import ArgumentKwargs, Option, OptionKwargs, argument, option
113
+ from ._option_groups import (
114
+ OptionGroup,
115
+ OptionGroupMixin,
116
+ option_group,
117
+ )
118
+ from ._sections import (
119
+ Section,
120
+ SectionMixin,
121
+ )
122
+ from ._commands import (
123
+ Command,
124
+ Group,
125
+ command,
126
+ group,
127
+ )
128
+ from .constraints import (
129
+ ConstraintMixin,
130
+ constrained_params,
131
+ constraint,
132
+ )
133
+ from .types import dir_path, file_path, path
134
+
135
+ __all__ = [
136
+ "Abort",
137
+ "Argument",
138
+ "ArgumentKwargs",
139
+ "BOOL",
140
+ "BadArgumentUsage",
141
+ "BadOptionUsage",
142
+ "BadParameter",
143
+ "BaseCommand",
144
+ "Choice",
145
+ "ClickException",
146
+ "Color",
147
+ "Command",
148
+ "CommandCollection",
149
+ "ConstraintMixin",
150
+ "Context",
151
+ "DateTime",
152
+ "FLOAT",
153
+ "File",
154
+ "FileError",
155
+ "FloatRange",
156
+ "Group",
157
+ "HelpFormatter",
158
+ "HelpSection",
159
+ "HelpTheme",
160
+ "INT",
161
+ "IntRange",
162
+ "MissingParameter",
163
+ "MultiCommand",
164
+ "NoSuchCommand",
165
+ "NoSuchOption",
166
+ "Option",
167
+ "OptionGroup",
168
+ "OptionGroupMixin",
169
+ "OptionKwargs",
170
+ "OptionParser",
171
+ "ParamType",
172
+ "Parameter",
173
+ "ParameterSource",
174
+ "Path",
175
+ "STRING",
176
+ "Section",
177
+ "SectionMixin",
178
+ "Style",
179
+ "Tuple",
180
+ "UNPROCESSED",
181
+ "UUID",
182
+ "UsageError",
183
+ "argument",
184
+ "clear",
185
+ "command",
186
+ "confirm",
187
+ "confirmation_option",
188
+ "constrained_params",
189
+ "constraint",
190
+ "custom_version_option",
191
+ "dir_path",
192
+ "echo",
193
+ "echo_via_pager",
194
+ "edit",
195
+ "file_path",
196
+ "format_filename",
197
+ "get_app_dir",
198
+ "get_binary_stream",
199
+ "get_current_context",
200
+ "get_pager_file",
201
+ "get_text_stream",
202
+ "getchar",
203
+ "group",
204
+ "help_option",
205
+ "launch",
206
+ "make_pass_decorator",
207
+ "open_file",
208
+ "option",
209
+ "option_group",
210
+ "pass_context",
211
+ "pass_obj",
212
+ "password_option",
213
+ "path",
214
+ "pause",
215
+ "progressbar",
216
+ "prompt",
217
+ "secho",
218
+ "style",
219
+ "unstyle",
220
+ "version_option",
221
+ "wrap_text",
222
+ ]