Skip to content

Commit 514596c

Browse files
committed
Merge branch 'feature/idf_py_replace_run_with_call' into 'master'
tools: idf.py: replace the "run" method of Task with the magic "__call__" method See merge request espressif/esp-idf!8763
2 parents 3a6b8bb + 8ed7fe3 commit 514596c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/idf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def __init__(self, callback, name, aliases, dependencies, order_dependencies, ac
200200
self.action_args = action_args
201201
self.aliases = aliases
202202

203-
def run(self, context, global_args, action_args=None):
203+
def __call__(self, context, global_args, action_args=None):
204204
if action_args is None:
205205
action_args = self.action_args
206206

@@ -611,7 +611,7 @@ def execute_tasks(self, tasks, **kwargs):
611611
name_with_aliases += " (aliases: %s)" % ", ".join(task.aliases)
612612

613613
print("Executing action: %s" % name_with_aliases)
614-
task.run(ctx, global_args, task.action_args)
614+
task(ctx, global_args, task.action_args)
615615

616616
self._print_closing_message(global_args, tasks_to_run.keys())
617617

0 commit comments

Comments
 (0)