replbase 0.0.44__tar.gz → 0.0.46__tar.gz
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.
- {replbase-0.0.44 → replbase-0.0.46}/PKG-INFO +1 -1
- {replbase-0.0.44 → replbase-0.0.46}/pyproject.toml +1 -1
- {replbase-0.0.44 → replbase-0.0.46}/replbase/cmd_meta.py +10 -5
- {replbase-0.0.44 → replbase-0.0.46}/replbase/repl_base.py +5 -6
- {replbase-0.0.44 → replbase-0.0.46}/LICENSE +0 -0
- {replbase-0.0.44 → replbase-0.0.46}/README.md +0 -0
- {replbase-0.0.44 → replbase-0.0.46}/replbase/__init__.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "replbase"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.46"
|
|
8
8
|
description = "\"Combination of other REPL tools into a reusable class that generates a REPL\""
|
|
9
9
|
authors = [ "Joseph Bochinski <stirgejr@gmail.com>",]
|
|
10
10
|
license = "MIT"
|
|
@@ -223,11 +223,16 @@ class CommandMeta:
|
|
|
223
223
|
if isinstance(arg_type, list):
|
|
224
224
|
cmd_init["nargs"] = "+"
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
try:
|
|
227
|
+
if cmd_init:
|
|
228
|
+
repl_cmd.parser.add_argument(flag_name, **cmd_init)
|
|
229
|
+
|
|
230
|
+
else:
|
|
231
|
+
repl_cmd.parser.add_argument(flag_name)
|
|
232
|
+
except TypeError as e:
|
|
233
|
+
print(
|
|
234
|
+
f"[ERROR]: {e} for:\n{self.func.__name__}.{arg} with {arg_type} and {parm.default}"
|
|
235
|
+
)
|
|
231
236
|
|
|
232
237
|
return repl_cmd
|
|
233
238
|
|
|
@@ -382,13 +382,12 @@ class ReplBase:
|
|
|
382
382
|
Enum: Selected enum value
|
|
383
383
|
"""
|
|
384
384
|
|
|
385
|
-
|
|
386
|
-
options = dict(enum_cls.__members__)
|
|
385
|
+
options = dict(enum_cls.__members__)
|
|
387
386
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
if len(options) == 1:
|
|
388
|
+
return list(options.values())[0]
|
|
389
|
+
else:
|
|
390
|
+
return self.input_choice_dict(prompt, options)
|
|
392
391
|
|
|
393
392
|
def debug(self, *args) -> None:
|
|
394
393
|
"""Print only if debug_enabled == True"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|