Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Mar 27, 2024
1 parent 513584f commit b9aed23
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sleap_roots/trait_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@


class NumpyArrayEncoder(json.JSONEncoder):
"""Custom encoder for NumPy array types.
This encoder is used to serialize NumPy arrays to JSON."""
"""Custom encoder for NumPy array types."""

def default(self, obj):
"""Serialize NumPy arrays to lists.
Expand All @@ -127,7 +125,8 @@ def default(self, obj):
obj: The object to serialize.
Returns:
A list representation of the NumPy array."""
A list representation of the NumPy array.
"""
if isinstance(obj, np.ndarray):
return obj.tolist()

Check warning on line 131 in sleap_roots/trait_pipelines.py

View check run for this annotation

Codecov / codecov/patch

sleap_roots/trait_pipelines.py#L130-L131

Added lines #L130 - L131 were not covered by tests
# Let the base class default method raise the TypeError
Expand Down

0 comments on commit b9aed23

Please sign in to comment.