Lines Matching defs:args
33 def inner_logged_action(sp_layout, sp, args :dict):
35 return action(sp_layout, sp, args)
46 def __call__(self, sp_layout, sp, args :dict):
50 return self.action(sp_layout, sp, args)
79 def run_actions(sp_layout: dict, args: dict, verbose=False):
86 :param args - arguments to be propagated through the call of actions.
89 args["called"] = [] # for debug purposes
90 def append_called(action, sp, args :dict):
91 args["called"].append(f"{action.__name__} -> {sp}")
92 return args
99 args = action(sp_layout, scope, args)
100 args = append_called(action, scope, args)
105 args = action(sp_layout, sp, args)
106 args = append_called(action, sp, args)
142 def my_action1(sp_layout, _, args :dict):
143 print(f"inside function my_action1{sp_layout}\n\n args:{args})")
144 return args # Always return args in action function.
146 def my_action2(sp_layout, sp_name, args :dict):
147 print(f"inside function my_action2; SP: {sp_name} {sp_layout} args:{args}")
148 return args
151 # 'args' can be extended in the action functions.
152 args = dict()
153 args["arg1"] = 0xEEE
154 args["arg2"] = 0xFF
155 SpSetupActions.run_actions(sp_layout, args)