From 6279bda3faa16916a2a84226e9ee82e669a88367 Mon Sep 17 00:00:00 2001 From: MilagrosMarin Date: Wed, 13 Nov 2024 14:35:01 +0000 Subject: [PATCH] fix: solve #noqa's --- aeon/__init__.py | 4 +++- aeon/dj_pipeline/tracking.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aeon/__init__.py b/aeon/__init__.py index 48a87f97..f5cb7fe7 100644 --- a/aeon/__init__.py +++ b/aeon/__init__.py @@ -12,4 +12,6 @@ del version, PackageNotFoundError # Set functions available directly under the 'aeon' top-level namespace -from aeon.io.api import load as load # noqa: PLC0414 +from aeon.io.api import load + +__all__ = ["load"] diff --git a/aeon/dj_pipeline/tracking.py b/aeon/dj_pipeline/tracking.py index 350c215b..559d08fb 100644 --- a/aeon/dj_pipeline/tracking.py +++ b/aeon/dj_pipeline/tracking.py @@ -370,7 +370,8 @@ def compute_distance(position_df, target, xcol="x", ycol="y"): xcol (str): x column name in ``position_df``. Default is 'x'. ycol (str): y column name in ``position_df``. Default is 'y'. """ - if len(target) != 2: # noqa PLR2004 + COORDS = 2 # x, y + if len(target) != COORDS: raise ValueError("Target must be a list of tuple of length 2.") return np.sqrt(np.square(position_df[[xcol, ycol]] - target).sum(axis=1))