From e189d8a0ad2f08ede15e60ef918ed91d40949d87 Mon Sep 17 00:00:00 2001 From: Marcus G K Williams <168222+mgkwill@users.noreply.github.com> Date: Wed, 28 Jun 2023 12:05:15 -0700 Subject: [PATCH] Fix codacy issues in callback_fx.py --- src/lava/magma/core/callback_fx.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/lava/magma/core/callback_fx.py b/src/lava/magma/core/callback_fx.py index 7e0f13652..b8099e450 100644 --- a/src/lava/magma/core/callback_fx.py +++ b/src/lava/magma/core/callback_fx.py @@ -61,16 +61,26 @@ class IterableCallBack(NxSdkCallbackFx): as pre and post run.""" def __init__(self, - pre_run_fxs: Iterable = [], - post_run_fxs: Iterable = []) -> None: + pre_run_fxs: Iterable = None, + post_run_fxs: Iterable = None) -> None: super().__init__() + if pre_run_fxs is None: + pre_run_fxs = [] + if post_run_fxs is None: + post_run_fxs = [] self.pre_run_fxs = pre_run_fxs self.post_run_fxs = post_run_fxs - def pre_run_callback(self, board: NxBoard, **_) -> None: + def pre_run_callback(self, + board: NxBoard, + _var_id_to_var_model_map: dict = None + ) -> None: for fx in self.pre_run_fxs: fx(board) - def post_run_callback(self, board: NxBoard, **_) -> None: + def post_run_callback(self, + board: NxBoard, + _var_id_to_var_model_map: dict = None + ) -> None: for fx in self.post_run_fxs: fx(board)