Callbacks called twice?

Here cb_funcs = listify(cbs) is used to setup cb_funcs to be a list of cbs

runner_init

Here for cbs is appended with cb which is a part of cb_funcs which came from cbs.
So my understanding is that callbacks get called twice? whats happening here?

1 Like

Runner(cb_funcs=listify(cbs)) leads to to innit method being called with (self, None, listify(cbs)). Note that the parameter of cbs is not being used in get_runner, so it is the default (None). They have same name but in different contexts so they are not the same.

If it were instead Runner(cbs, cb_funcs=listify(cbs)) then yes, it would be doing it twice as you say.

1 Like