@@ -25,11 +25,11 @@ def calculate_function(traversal, howcall=None):
2525 )
2626 )
2727
28- if "pipeline " in traversal .specific_invocation_params :
28+ if "code " in traversal .specific_invocation_params :
2929
3030 return {
3131 "function" : interpret .build_function (
32- traversal .specific_invocation_params ["pipeline " ],
32+ traversal .specific_invocation_params ["code " ],
3333 global_namespace = global_namespace ,
3434 howcall = howcall ,
3535 )
@@ -41,7 +41,7 @@ def calculate_function(traversal, howcall=None):
4141def calculate_reduce (traversal ):
4242
4343 function = interpret .build_function (
44- traversal .specific_invocation_params ["pipeline " ],
44+ traversal .specific_invocation_params ["code " ],
4545 traversal .global_invocation_options .global_options ["global_namespace" ],
4646 howcall = interpret .HowCall .VARARGS ,
4747 )
@@ -146,38 +146,37 @@ async def async_chain(items, exit_stack):
146146
147147
148148subcommands = [
149- click .Command ("map" , short_help = "Call <pipeline > on each line of input." ),
150- click .Command ("async-map" , short_help = "Call <pipeline > on each line of input." ),
151- click .Command ("apply" , short_help = "Call <pipeline > on input as a sequence." ),
149+ click .Command ("map" , short_help = "Call <code > on each line of input." ),
150+ click .Command ("async-map" , short_help = "Call <code > on each line of input." ),
151+ click .Command ("apply" , short_help = "Call <code > on input as a sequence." ),
152152 click .Command (
153- "async-apply" ,
154- short_help = "Call <pipeline> asynchronously on input as a sequence." ,
153+ "async-apply" , short_help = "Call <code> asynchronously on input as a sequence."
155154 ),
156155 click .Command (
157156 "filter" ,
158- short_help = "Call <pipeline > on each line of input and exclude false values." ,
157+ short_help = "Call <code > on each line of input and exclude false values." ,
159158 ),
160159 click .Command (
161160 "async-filter" ,
162- short_help = "Async call <pipeline > on each line of input and exclude false values." ,
161+ short_help = "Async call <code > on each line of input and exclude false values." ,
163162 ),
164163 click .Command (
165- "stack" , short_help = "Call <pipeline > on input as a single concatenated string."
164+ "stack" , short_help = "Call <code > on input as a single concatenated string."
166165 ),
167166 click .Command (
168167 "async-map-unordered" ,
169- short_help = "Call <pipeline > on each line of input, ignoring order of input items." ,
168+ short_help = "Call <code > on each line of input, ignoring order of input items." ,
170169 ),
171170 click .Command (
172171 "dropwhile" ,
173172 short_help = "Evaluate <predicate> on function and drop values until first falsy." ,
174173 ),
175- click .Command ("eval" , short_help = "Evaluate a python expression <pipeline >" ),
174+ click .Command ("eval" , short_help = "Evaluate a python expression <code >" ),
176175]
177176
178177
179178def build_callback (sub_command ):
180- def callback (pipeline , autocall , ** parameters ):
179+ def callback (code , autocall , ** parameters ):
181180 if autocall :
182181 howcall = interpret .HowCall .SINGLE
183182 else :
@@ -187,7 +186,7 @@ def callback(pipeline, autocall, **parameters):
187186 {
188187 "name" : sub_command .name .replace ("-" , "_" ),
189188 "howcall" : howcall ,
190- "pipeline " : pipeline ,
189+ "code " : code ,
191190 "parameters" : parameters ,
192191 }
193192 ]
@@ -203,7 +202,7 @@ def callback(pipeline, autocall, **parameters):
203202
204203 subcommand .params = [
205204 click .Option (["--autocall/--no-autocall" ], is_flag = True , default = True ),
206- click .Argument (["pipeline " ]),
205+ click .Argument (["code " ]),
207206 ]
208207 subcommand .callback = build_callback (subcommand )
209208 subcommand = option_exec_before (subcommand )
@@ -220,19 +219,19 @@ def callback(pipeline, autocall, **parameters):
220219def _reduce (function_name , ** parameters ):
221220 return [
222221 {
223- "pipeline " : f"toolz.curry({ function_name } )" ,
222+ "code " : f"toolz.curry({ function_name } )" ,
224223 "name" : "reduce" ,
225224 "parameters" : parameters ,
226225 }
227226 ]
228227
229228
230229# @registry.add_cli(name="eval")
231- # @click.command("eval", short_help="Call <pipeline > without any input.")
230+ # @click.command("eval", short_help="Call <code > without any input.")
232231# @option_exec_before
233232# @click.argument("expression")
234233# def _eval(expression, **parameters):
235- # return [{"pipeline ": expression, "name": "eval", "parameters": parameters}]
234+ # return [{"code ": expression, "name": "eval", "parameters": parameters}]
236235
237236
238237more_commands = [
0 commit comments