Skip to content

Commit

Permalink
fixing type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldies committed Jul 11, 2024
1 parent 6adf992 commit 4257150
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datumaro/plugins/datumaro_format/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: MIT

import os.path as osp
from typing import List, Union

from datumaro.components.annotation import (
AnnotationType,
Expand Down Expand Up @@ -269,8 +270,8 @@ def _load_annotations(self, item: dict):
return loaded

def _load_skeleton_elements_annotations(
self, ann: dict, label_id: int, points: list[float | int]
) -> list[Points]:
self, ann: dict, label_id: int, points: List[Union[float, int]]
) -> List[Points]:
if len(points) % 3 != 0:
raise InvalidAnnotationError(
f"Points have invalid value count {len(points)}, "
Expand Down

0 comments on commit 4257150

Please sign in to comment.