diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29b5a5a..95e639c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ exclude: | repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: check-ast @@ -29,7 +29,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.3.7 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/ioos_metrics/ioos_metrics.py b/ioos_metrics/ioos_metrics.py index 27fabb1..004acc8 100644 --- a/ioos_metrics/ioos_metrics.py +++ b/ioos_metrics/ioos_metrics.py @@ -65,7 +65,7 @@ def _compare_metrics(column, num) -> str: last_row = previous_metrics().iloc[-1] date = last_row["date_UTC"] if num is None: - msg = f"[{date}] : {column} failed." + return f"[{date}] : {column} failed." old = last_row[column] if old == num: @@ -576,7 +576,7 @@ def update_metrics(*, debug=False): try: num = function() except Exception: - logging.exception(f"{function=} failed.") + logging.exception(f"{column=} failed.") num = None new_row.update({column: num}) # Log status.