From 0bb8bedd2ff06efe7978bb28faf432f852691975 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:53:36 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.9 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.9...v0.5.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5952a6f..77115fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.9 + rev: v0.5.0 hooks: - id: ruff args: ["--fix", "--show-fixes"] From 9ec398c92e3e8c670476a582a7e07cea3c186075 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 21:54:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ioos_qc/qartod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ioos_qc/qartod.py b/ioos_qc/qartod.py index 8d931d4..e2a779a 100644 --- a/ioos_qc/qartod.py +++ b/ioos_qc/qartod.py @@ -745,7 +745,7 @@ def run_test(test_threshold, flag_value) -> None: # find data ranges that are within threshold and flag them test_results = np.ma.filled(data_range < tolerance, fill_value=False) # data points before end of first window should pass - n_fill = count if count < len(inp) else len(inp) + n_fill = min(len(inp), count) test_results = np.insert(test_results, 0, np.full((n_fill,), False)) flag_arr[test_results] = flag_value