click-extended 1.0.9__py3-none-any.whl → 1.0.10__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.
- click_extended/core/decorators/option.py +16 -0
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/METADATA +1 -1
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/RECORD +7 -7
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/WHEEL +1 -1
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/licenses/AUTHORS.md +0 -0
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/licenses/LICENSE +0 -0
- {click_extended-1.0.9.dist-info → click_extended-1.0.10.dist-info}/top_level.txt +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# pylint: disable=too-many-positional-arguments
|
|
5
5
|
# pylint: disable=too-many-locals
|
|
6
6
|
# pylint: disable=too-many-branches
|
|
7
|
+
# pylint: disable=too-many-statements
|
|
7
8
|
# pylint: disable=redefined-builtin
|
|
8
9
|
|
|
9
10
|
import asyncio
|
|
@@ -82,6 +83,21 @@ class Option(OptionNode):
|
|
|
82
83
|
**kwargs (Any):
|
|
83
84
|
Additional Click option parameters.
|
|
84
85
|
"""
|
|
86
|
+
if is_short_flag(name):
|
|
87
|
+
long_flag = next(
|
|
88
|
+
(flag for flag in flags if is_long_flag(flag)), None
|
|
89
|
+
)
|
|
90
|
+
if long_flag is None:
|
|
91
|
+
raise ValueError(
|
|
92
|
+
f"Short flag '{name}' provided without a long flag. "
|
|
93
|
+
"Provide a long flag to derive the option name, e.g. "
|
|
94
|
+
f"@option('{name}', '--flag'), or pass an explicit "
|
|
95
|
+
f"snake_case name like @option('flag', '{name}')."
|
|
96
|
+
)
|
|
97
|
+
if name not in flags:
|
|
98
|
+
flags = (name,) + flags
|
|
99
|
+
name = long_flag
|
|
100
|
+
|
|
85
101
|
if name.startswith("--"):
|
|
86
102
|
if is_long_flag(name):
|
|
87
103
|
derived_name = name[2:]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: click_extended
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.10
|
|
4
4
|
Summary: An extension to Click with additional features like automatic async support, aliasing and a modular decorator system.
|
|
5
5
|
Author-email: Marcus Fredriksson <marcus@marcusfredriksson.com>
|
|
6
6
|
License: MIT License
|
|
@@ -9,7 +9,7 @@ click_extended/core/decorators/command.py,sha256=82rwi8PIMGgOagFoNISOQkdEebKxvS9
|
|
|
9
9
|
click_extended/core/decorators/context.py,sha256=y_jzARNNdu2JyUhIaUFpCAurztOTsYJTX96HQ2csZs0,1546
|
|
10
10
|
click_extended/core/decorators/env.py,sha256=DgbQsOZ2De-Ur5hxR8hzN3-3T16K3FLsoZHS2EsKK6c,4777
|
|
11
11
|
click_extended/core/decorators/group.py,sha256=_bammCVi_7vsw7YgSUTQuQp6XFUHy7knNcOmyg6DiPc,2859
|
|
12
|
-
click_extended/core/decorators/option.py,sha256=
|
|
12
|
+
click_extended/core/decorators/option.py,sha256=iUJ6O60GgGy1resjmC9DHuvLg_2UTmw8fcjptNiAI0Y,12476
|
|
13
13
|
click_extended/core/decorators/prompt.py,sha256=QwySQ6ZK0j0iL_jlwH3AU0U4G1X3MKAJ8_TysEXxFX8,1735
|
|
14
14
|
click_extended/core/decorators/selection.py,sha256=5cjWpAwReu8EY0mkziwpqhi_T5ucIlAPx1p-t3MkGJQ,5589
|
|
15
15
|
click_extended/core/decorators/tag.py,sha256=395e6GN59QBj-L0NSBPynQOX3_2LAOIXkj8XKNXrRPs,3055
|
|
@@ -144,9 +144,9 @@ click_extended/utils/naming.py,sha256=kNmzOqidgZZ1dE5aMYrxpWt4VwcLuEiFunpumpfHuZ
|
|
|
144
144
|
click_extended/utils/process.py,sha256=sU3ZCMjBgjKcDnTRLKPdQ_TAjk0AT7Q8SatagD0JyHA,9729
|
|
145
145
|
click_extended/utils/selection.py,sha256=_OQC88pGPUh29boxmS5ugXEi9jZGqAG180S27PeQaj0,9875
|
|
146
146
|
click_extended/utils/time.py,sha256=H5m5caIEau_1GHkiYgKL_LcTtVdw2TkFVbkqJu7A9rQ,1067
|
|
147
|
-
click_extended-1.0.
|
|
148
|
-
click_extended-1.0.
|
|
149
|
-
click_extended-1.0.
|
|
150
|
-
click_extended-1.0.
|
|
151
|
-
click_extended-1.0.
|
|
152
|
-
click_extended-1.0.
|
|
147
|
+
click_extended-1.0.10.dist-info/licenses/AUTHORS.md,sha256=NkShPinjqtnRDQVRyVnfJuOGM56sejauE3WRoYCcbtw,132
|
|
148
|
+
click_extended-1.0.10.dist-info/licenses/LICENSE,sha256=gjO8hzM4mFSBXFikktaXVSgmXGcre91_GPJ-E_yP56E,1075
|
|
149
|
+
click_extended-1.0.10.dist-info/METADATA,sha256=gPGL5Ui0QKLmj7LywnsrtOL0NLNGa_JywqU2BTWPIxU,10842
|
|
150
|
+
click_extended-1.0.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
151
|
+
click_extended-1.0.10.dist-info/top_level.txt,sha256=2G3bm6tCNv80okRm773jKTk-_z1ElY-seaozZrn_TxA,15
|
|
152
|
+
click_extended-1.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|