diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2d417b..43025cf 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.7.2 + rev: v0.8.1 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/ioos_qc/argo.py b/ioos_qc/argo.py index e3631ed..701e0d1 100644 --- a/ioos_qc/argo.py +++ b/ioos_qc/argo.py @@ -3,8 +3,8 @@ import logging import warnings +from collections.abc import Sequence from numbers import Real as N -from typing import Sequence import numpy as np diff --git a/ioos_qc/axds.py b/ioos_qc/axds.py index dc5045d..71dbbcb 100644 --- a/ioos_qc/axds.py +++ b/ioos_qc/axds.py @@ -3,7 +3,8 @@ import logging from collections import namedtuple -from typing import Sequence, Tuple +from collections.abc import Sequence +from typing import Tuple import numpy as np diff --git a/ioos_qc/config_creator/__init__.py b/ioos_qc/config_creator/__init__.py index 34ae9f1..3d85dcb 100644 --- a/ioos_qc/config_creator/__init__.py +++ b/ioos_qc/config_creator/__init__.py @@ -7,9 +7,9 @@ ) __all__ = [ + "QC_CONFIG_CREATOR_SCHEMA", + "VARIABLE_CONFIG_SCHEMA", "CreatorConfig", "QcConfigCreator", "QcVariableConfig", - "QC_CONFIG_CREATOR_SCHEMA", - "VARIABLE_CONFIG_SCHEMA", ] diff --git a/ioos_qc/qartod.py b/ioos_qc/qartod.py index a215cb2..f2d7f57 100644 --- a/ioos_qc/qartod.py +++ b/ioos_qc/qartod.py @@ -4,8 +4,9 @@ import logging import warnings from collections import namedtuple +from collections.abc import Sequence from numbers import Real as N -from typing import Dict, List, Optional, Sequence, Tuple, Union +from typing import Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd diff --git a/ioos_qc/utils.py b/ioos_qc/utils.py index 0df98f2..084ca3f 100644 --- a/ioos_qc/utils.py +++ b/ioos_qc/utils.py @@ -225,8 +225,7 @@ def check_timestamps( return not ( not np.array_equal(time_diff, sort_diff) or np.any(sort_diff == zero) - or max_time_interval is not None - and np.any(sort_diff > max_time_interval) + or (max_time_interval is not None and np.any(sort_diff > max_time_interval)) )