Skip to content

Commit 25815f8

Browse files
akbakb
authored andcommitted
eval takes pipeline not expression
1 parent 40e2732 commit 25815f8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Generate json objects
447447
448448
[[alias.stage]]
449449
command = "eval"
450-
options = {expression="pairs", autocall=false}
450+
options = {pipeline="pairs"}
451451
452452
[[alias.stage]]
453453
command = "map"

src/mario/plugins/basic.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ async def async_chain(items, exit_stack):
172172
"dropwhile",
173173
short_help="Evaluate <predicate> on function and drop values until first falsy.",
174174
),
175+
click.Command("eval", short_help="Evaluate a python expression <pipeline>"),
175176
]
176177

177178

@@ -226,12 +227,12 @@ def _reduce(function_name, **parameters):
226227
]
227228

228229

229-
@registry.add_cli(name="eval")
230-
@click.command("eval", short_help="Call <pipeline> without any input.")
231-
@option_exec_before
232-
@click.argument("expression")
233-
def _eval(expression, **parameters):
234-
return [{"pipeline": expression, "name": "eval", "parameters": parameters}]
230+
# @registry.add_cli(name="eval")
231+
# @click.command("eval", short_help="Call <pipeline> without any input.")
232+
# @option_exec_before
233+
# @click.argument("expression")
234+
# def _eval(expression, **parameters):
235+
# return [{"pipeline": expression, "name": "eval", "parameters": parameters}]
235236

236237

237238
more_commands = [

0 commit comments

Comments
 (0)