From 180402b9945397f6123282d86ab6f3551ecc849a Mon Sep 17 00:00:00 2001 From: Anselm Hahn Date: Sat, 17 Feb 2024 23:44:59 +0100 Subject: [PATCH] fix: :test_tube: Fix exception handling in FitReport class --- spectrafit/report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spectrafit/report.py b/spectrafit/report.py index 10e45ca80..9898db06b 100644 --- a/spectrafit/report.py +++ b/spectrafit/report.py @@ -529,7 +529,7 @@ def generate_variables(self) -> pd.DataFrame: model_val = self.modelpars[name].value # type: ignore try: sval = gformat(par.value) - except (TypeError, ValueError): + except (TypeError, ValueError): # pragma: no cover sval = None serr = None spercent = None @@ -537,7 +537,7 @@ def generate_variables(self) -> pd.DataFrame: serr = gformat(par.stderr) try: spercent = abs(par.stderr / par.value) - except ZeroDivisionError: + except ZeroDivisionError: # pragma: no cover spercent = None variable = {