Skip to content

Commit 16f0252

Browse files
committed
Version update
1 parent e1ebe30 commit 16f0252

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/superannotate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
import typing
55

6-
__version__ = "4.4.10dev7"
6+
__version__ = "4.4.10dev8"
77

88
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
99

src/superannotate/lib/core/usecases/annotations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,11 +1520,13 @@ def execute(self):
15201520
self.reporter.log_warning(
15211521
f"Could not find annotations for {len_provided_items - len_items}/{len_provided_items} items."
15221522
)
1523-
else:
1523+
elif self._item_names is None:
15241524
condition = Condition("project_id", self._project.id, EQ) & Condition(
15251525
"folder_id", self._folder.id, EQ
15261526
)
15271527
items = get_or_raise(self._service_provider.items.list(condition))
1528+
else:
1529+
items = []
15281530
id_item_map = {i.id: i for i in items}
15291531
if not items:
15301532
logger.info("No annotations to download.")

tests/integration/annotations/test_get_annotations.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_get_annotations_logs(self):
130130
items_names = [self.IMAGE_NAME] * 4
131131
items_names.append("Non-existent item")
132132
with self.assertLogs("sa", level="INFO") as cm:
133-
assert len(sa.get_annotations(self.PROJECT_NAME, items_names)) == 4
133+
assert len(sa.get_annotations(self.PROJECT_NAME, items_names)) == 1
134134
assert (
135135
"INFO:sa:Dropping duplicates. Found 2/5 unique items." == cm.output[0]
136136
)
@@ -206,5 +206,3 @@ def test_empty_list_get(self):
206206
)
207207
annotations = sa.get_annotations(self.PROJECT_NAME, items=[])
208208
assert len(annotations) == 0
209-
annotations = sa.get_annotations(self.PROJECT_NAME, items=None)
210-
assert len(annotations) == 2

tests/integration/annotations/video/test_get_annotations_per_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ def test_video_annotation_upload(self):
6262
"INFO:sa:Getting annotations for 31 frames from video.mp4."
6363
== cm.output[0]
6464
)
65-
assert cm.output[0] == 1
65+
assert len(cm.output) == 1

0 commit comments

Comments
 (0)