Skip to content

Commit

Permalink
fix: 🧪 Fix exception handling in FitReport class
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselmoo committed Feb 17, 2024
1 parent 76c9d8a commit 180402b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spectrafit/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,15 @@ 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
if par.stderr is not None:
serr = gformat(par.stderr)
try:
spercent = abs(par.stderr / par.value)
except ZeroDivisionError:
except ZeroDivisionError: # pragma: no cover
spercent = None

variable = {
Expand Down

0 comments on commit 180402b

Please sign in to comment.