falyx 0.1.41__py3-none-any.whl → 0.1.42__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.
- falyx/command.py +3 -1
- falyx/falyx.py +20 -5
- falyx/parsers/parsers.py +7 -8
- falyx/version.py +1 -1
- {falyx-0.1.41.dist-info → falyx-0.1.42.dist-info}/METADATA +1 -1
- {falyx-0.1.41.dist-info → falyx-0.1.42.dist-info}/RECORD +9 -9
- {falyx-0.1.41.dist-info → falyx-0.1.42.dist-info}/LICENSE +0 -0
- {falyx-0.1.41.dist-info → falyx-0.1.42.dist-info}/WHEEL +0 -0
- {falyx-0.1.41.dist-info → falyx-0.1.42.dist-info}/entry_points.txt +0 -0
falyx/command.py
CHANGED
@@ -313,7 +313,9 @@ class Command(BaseModel):
|
|
313
313
|
if not self.arg_parser:
|
314
314
|
return "No arguments defined."
|
315
315
|
|
316
|
-
|
316
|
+
command_keys_text = self.arg_parser.get_command_keys_text(plain_text=True)
|
317
|
+
options_text = self.arg_parser.get_options_text(plain_text=True)
|
318
|
+
return f" {command_keys_text:<20} {options_text} "
|
317
319
|
|
318
320
|
def log_summary(self) -> None:
|
319
321
|
if self._context:
|
falyx/falyx.py
CHANGED
@@ -830,10 +830,11 @@ class Falyx:
|
|
830
830
|
self.console.print(
|
831
831
|
f"[{OneColors.LIGHT_YELLOW}]⚠️ Unknown command '{choice}'[/]"
|
832
832
|
)
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
833
|
+
else:
|
834
|
+
raise ValidationError(
|
835
|
+
message=f"Unknown command '{choice}'.",
|
836
|
+
cursor_position=len(raw_choices),
|
837
|
+
)
|
837
838
|
return is_preview, None, args, kwargs
|
838
839
|
|
839
840
|
def _create_context(self, selected_command: Command) -> ExecutionContext:
|
@@ -1149,9 +1150,23 @@ class Falyx:
|
|
1149
1150
|
f"[{OneColors.CYAN_b}]🚀 Running all commands with tag:[/] "
|
1150
1151
|
f"{self.cli_args.tag}"
|
1151
1152
|
)
|
1153
|
+
|
1152
1154
|
for cmd in matching:
|
1153
1155
|
self._set_retry_policy(cmd)
|
1154
|
-
|
1156
|
+
try:
|
1157
|
+
await self.run_key(cmd.key)
|
1158
|
+
except FalyxError as error:
|
1159
|
+
self.console.print(f"[{OneColors.DARK_RED}]❌ Error: {error}[/]")
|
1160
|
+
sys.exit(1)
|
1161
|
+
except QuitSignal:
|
1162
|
+
logger.info("[QuitSignal]. <- Exiting run.")
|
1163
|
+
sys.exit(0)
|
1164
|
+
except BackSignal:
|
1165
|
+
logger.info("[BackSignal]. <- Exiting run.")
|
1166
|
+
sys.exit(0)
|
1167
|
+
except CancelSignal:
|
1168
|
+
logger.info("[CancelSignal]. <- Exiting run.")
|
1169
|
+
sys.exit(0)
|
1155
1170
|
|
1156
1171
|
if self.cli_args.summary:
|
1157
1172
|
er.summary()
|
falyx/parsers/parsers.py
CHANGED
@@ -88,22 +88,21 @@ def get_arg_parsers(
|
|
88
88
|
parser.add_argument("--version", action="store_true", help="Show Falyx version")
|
89
89
|
subparsers = parser.add_subparsers(dest="command")
|
90
90
|
|
91
|
-
run_description = "Run a command by its key or alias
|
92
|
-
|
91
|
+
run_description = ["Run a command by its key or alias.\n"]
|
92
|
+
run_description.append("commands:")
|
93
93
|
if isinstance(commands, dict):
|
94
94
|
for command in commands.values():
|
95
|
-
|
95
|
+
run_description.append(command.usage)
|
96
96
|
command_description = command.description or command.help_text
|
97
|
-
|
98
|
-
|
99
|
-
run_epilog.append(
|
97
|
+
run_description.append(f"{' '*24}{command_description}")
|
98
|
+
run_epilog = (
|
100
99
|
"Tip: Use 'falyx run ?[COMMAND]' to preview commands by their key or alias."
|
101
100
|
)
|
102
101
|
run_parser = subparsers.add_parser(
|
103
102
|
"run",
|
104
103
|
help="Run a specific command",
|
105
|
-
description=run_description,
|
106
|
-
epilog=
|
104
|
+
description="\n".join(run_description),
|
105
|
+
epilog=run_epilog,
|
107
106
|
formatter_class=RawDescriptionHelpFormatter,
|
108
107
|
)
|
109
108
|
run_parser.add_argument("name", help="Run a command by its key or alias")
|
falyx/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.1.
|
1
|
+
__version__ = "0.1.42"
|
@@ -23,13 +23,13 @@ falyx/action/signal_action.py,sha256=5UMqvzy7fBnLANGwYUWoe1VRhrr7e-yOVeLdOnCBiJo
|
|
23
23
|
falyx/action/types.py,sha256=NfZz1ufZuvCgp-he2JIItbnjX7LjOUadjtKbjpRlSIY,1399
|
24
24
|
falyx/action/user_input_action.py,sha256=7kL5G7L0j2LuLvHu-CMwOaHyEisagE7O_2G2EhqWRr8,3483
|
25
25
|
falyx/bottom_bar.py,sha256=iWxgOKWgn5YmREeZBuGA50FzqzEfz1-Vnqm0V_fhldc,7383
|
26
|
-
falyx/command.py,sha256=
|
26
|
+
falyx/command.py,sha256=JO_kPoEUFnW_0BMP7tvdjfj78uWUSfT3JAo-zOqouPM,15023
|
27
27
|
falyx/config.py,sha256=BBDRv5uj0teydBm25eTIvEl9hKQqGGGX-Z6H9EHOHHw,10077
|
28
28
|
falyx/context.py,sha256=NfBpxzFzn-dYP6I3wrtGFucqm__UZo4SSBLmM8yYayE,10330
|
29
29
|
falyx/debug.py,sha256=IRpYtdH8yeXJEsfP5rASALmBQb2U_EwrTudF2GIDdZY,1545
|
30
30
|
falyx/exceptions.py,sha256=kK9k1v7LVNjJSwYztRa9Krhr3ZOI-6Htq2ZjlYICPKg,922
|
31
31
|
falyx/execution_registry.py,sha256=rctsz0mrIHPToLZqylblVjDdKWdq1x_JBc8GwMP5sJ8,4710
|
32
|
-
falyx/falyx.py,sha256=
|
32
|
+
falyx/falyx.py,sha256=kMQWAd_uL8M5hkzRy7k1KgNe5wBzkWCyHvqwFjykvdI,47340
|
33
33
|
falyx/hook_manager.py,sha256=TFuHQnAncS_rk6vuw-VSx8bnAppLuHfrZCrzLwqcO9o,2979
|
34
34
|
falyx/hooks.py,sha256=xMfQROib0BNsaQF4AXJpmCiGePoE1f1xpcdibgnVZWM,2913
|
35
35
|
falyx/init.py,sha256=VZ3rYMxo7g01EraYATdl_pRN4ZqrsVueo2ZFx54gojo,3326
|
@@ -39,7 +39,7 @@ falyx/options_manager.py,sha256=dFAnQw543tQ6Xupvh1PwBrhiSWlSACHw8K-sHP_lUh4,2842
|
|
39
39
|
falyx/parsers/.pytyped,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
falyx/parsers/__init__.py,sha256=l0QMf89uJHhTpOqQfiV3tx7aAHvELqDFWAyjCbwEgBQ,370
|
41
41
|
falyx/parsers/argparse.py,sha256=WB8InZJ_WOaqi6J80IfnxInRyJ7aBCP0sv0zalo8al0,36924
|
42
|
-
falyx/parsers/parsers.py,sha256=
|
42
|
+
falyx/parsers/parsers.py,sha256=RQdfK_347TeTMYWZ_7WqZxGaslC-fRZeuir4kdHjvFM,6527
|
43
43
|
falyx/parsers/signature.py,sha256=i4iOiJxv70sxQYivKKXC_YOsShRUYfcI8Cjq8yVZvMo,2262
|
44
44
|
falyx/parsers/utils.py,sha256=Z4qLu8NVIprcHK2RDXoISpcDKBUii3n05G9mlgiPDgw,889
|
45
45
|
falyx/prompt_utils.py,sha256=qgk0bXs7mwzflqzWyFhEOTpKQ_ZtMIqGhKeg-ocwNnE,1542
|
@@ -53,9 +53,9 @@ falyx/themes/__init__.py,sha256=1CZhEUCin9cUk8IGYBUFkVvdHRNNJBEFXccHwpUKZCA,284
|
|
53
53
|
falyx/themes/colors.py,sha256=4aaeAHJetmeNInI0Zytg4E3YqKfPFelpf04vtjSvsS8,19776
|
54
54
|
falyx/utils.py,sha256=U45xnZFUdoFC4xiji_9S1jHS5V7MvxSDtufP8EgB0SM,6732
|
55
55
|
falyx/validators.py,sha256=t5iyzVpY8tdC4rfhr4isEfWpD5gNTzjeX_Hbi_Uq6sA,1328
|
56
|
-
falyx/version.py,sha256=
|
57
|
-
falyx-0.1.
|
58
|
-
falyx-0.1.
|
59
|
-
falyx-0.1.
|
60
|
-
falyx-0.1.
|
61
|
-
falyx-0.1.
|
56
|
+
falyx/version.py,sha256=a0ON039K5sX117g1thh7kP35cYMBjBhhhU9A-PERuT0,23
|
57
|
+
falyx-0.1.42.dist-info/LICENSE,sha256=B0yqgaHuSdhN7T3OBmgQSiDTy8HqT5Oe_dLypRe4Ra4,1073
|
58
|
+
falyx-0.1.42.dist-info/METADATA,sha256=8L4CG1zpDFOwepLhP9oji_1UGmTkM24p6_QcHRQDY8c,5517
|
59
|
+
falyx-0.1.42.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
60
|
+
falyx-0.1.42.dist-info/entry_points.txt,sha256=j8owOSl2j1Ss8DtGMnKfgehKaolqnIPhVFHaUBLUnMs,45
|
61
|
+
falyx-0.1.42.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|