Skip to content

Commit

Permalink
fix: solve #noqa's
Browse files Browse the repository at this point in the history
  • Loading branch information
MilagrosMarin committed Nov 13, 2024
1 parent 6be26d1 commit 6279bda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion aeon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 2 additions & 1 deletion aeon/dj_pipeline/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 6279bda

Please sign in to comment.