Skip to content

Commit ce504df

Browse files
authored
Remove cattrs (#2446)
1 parent 7fc9f87 commit ce504df

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ classifiers = [
2727
dynamic = ["version", "readme"]
2828
dependencies = [
2929
"attrs",
30-
"cattrs",
3130
"omegaconf",
3231
"imageio",
3332
"imageio-ffmpeg",

sleap/sleap_io_adaptors/lf_labels_utils.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from typing import List, Dict, Optional, Text, Union
88

99
from pathlib import Path
10-
import cattr
1110
import os
1211

1312
from sleap import util
@@ -873,14 +872,6 @@ def video_callback(
873872
for i, item in enumerate(video_list):
874873
item.replace_filename(filenames[i])
875874

876-
if USE_DUMMY_FOR_MISSING_VIDEOS and sum(missing):
877-
# Replace any video still missing with "dummy" video
878-
for is_missing, item in zip(missing, video_list):
879-
from sleap.io.video import DummyVideo
880-
881-
vid = DummyVideo(filename=item.filename)
882-
item["backend"] = cattr.unstructure(vid)
883-
884875
return video_callback
885876

886877

tests/fixtures/datasets.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,6 @@ def siv_robot():
7676
return sio.load_file(TEST_SLP_SIV_ROBOT)
7777

7878

79-
@pytest.fixture
80-
def siv_robot_caching():
81-
"""Created after caching attribute was added to `SingleImageVideo` backend.
82-
83-
The typehinting of the `caching` attribute (#1243) caused it to be used by cattrs to
84-
determine which type of dataclass to use. However, the older datasets containing
85-
`SingleImageVideo`s were now being read in as `NumpyVideo`s. Although removing the
86-
typehinting from `caching` seems to do the trick (and never made it into an official
87-
release), this is a fixture to test that datasets created while `caching` was added
88-
into the serialization are read in correctly.
89-
"""
90-
return sio.load_file(TEST_SLP_SIV_ROBOT_CACHING)
91-
92-
9379
@pytest.fixture
9480
def min_tracks_2node_labels():
9581
return sio.load_file(TEST_MIN_TRACKS_2NODE_LABELS)

0 commit comments

Comments
 (0)