Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobronium committed Jul 30, 2024
1 parent 0864dec commit 810cf95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 1 addition & 5 deletions datumaro/components/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ def _reindex(self):

@property
def labels(self):
return {
label_index: parent + name
for (parent, name), label_index
in self._indices.items()
}
return {label_index: parent + name for (parent, name), label_index in self._indices.items()}

def add(
self, name: str, parent: Optional[str] = "", attributes: Optional[Set[str]] = None
Expand Down
4 changes: 3 additions & 1 deletion datumaro/util/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ def compare_datasets(
ann_b_matches, lambda x: _compare_annotations(x, ann_a, ignored_attrs=ignored_attrs)
)
if ann_b is None:
test.fail("ann\n\t%s,\ncandidates\n\t%s" % (ann_a, "\n\t".join(map(str, ann_b_matches))))
test.fail(
"ann\n\t%s,\ncandidates\n\t%s" % (ann_a, "\n\t".join(map(str, ann_b_matches)))
)
item_b.annotations.remove(ann_b) # avoid repeats


Expand Down

0 comments on commit 810cf95

Please sign in to comment.