Skip to content

Commit 6c1c024

Browse files
committed
Fix folders delete
1 parent 21d4a0a commit 6c1c024

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/superannotate/lib/core/conditions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __or__(self, other):
3636
QueryCondition(
3737
CONDITION_OR,
3838
other.build_query(),
39-
{other._key: other._value} if isinstance(other, Condition) else {},
39+
{other._key: other._value} if type(other) == Condition else {},
4040
)
4141
)
4242
return self
@@ -56,7 +56,7 @@ def __and__(self, other):
5656
QueryCondition(
5757
CONDITION_AND,
5858
other.build_query(),
59-
{other._key: other._value} if isinstance(other, Condition) else {},
59+
{other._key: other._value} if type(other) == Condition else {},
6060
)
6161
)
6262
return self

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def execute(self):
362362
len_existing, len_provided = len(existing_items), len(annotation_names_set)
363363
if len_existing < len_provided:
364364
logger.warning(
365-
f"Couldn't find {len_existing}/{len_provided} "
365+
f"Couldn't find {len_provided - len_existing}/{len_provided} "
366366
"items in the given directory that match the annotations."
367367
)
368368
items_to_upload: List[ItemToUpload] = []

tests/integration/projects/test_create_project_from_metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def test_metadata_create_workflow(self):
131131
pr_1_metadata = sa.get_project_metadata(self.PROJECT_1, include_annotation_classes=True, include_workflow=True)
132132
pr_1_metadata["name"] = self.PROJECT_2
133133
sa.create_project_from_metadata(pr_1_metadata)
134-
pr_2_metadata = sa.get_project_metadata(self.PROJECT_2, include_workflow=True)
134+
pr_2_metadata = sa.get_project_metadata(self.PROJECT_2, include_workflow=True, include_annotation_classes=True)
135135
assert pr_2_metadata["workflows"][0]["className"] == "class1"
136136
assert pr_2_metadata["workflows"][1]["className"] == "class2"
137-
self.assertEqual(pr_2_metadata["classes"][0]['className'], "class1")
138-
self.assertEqual(pr_2_metadata["classes"][1]['className'], "class2")
137+
self.assertEqual(pr_2_metadata["classes"][0]['name'], "class1")
138+
self.assertEqual(pr_2_metadata["classes"][1]['name'], "class2")

0 commit comments

Comments
 (0)