Skip to content

Commit 8e62e62

Browse files
committed
AL-3578: Fixed mypy issues
1 parent aa0c5fe commit 8e62e62

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labelbox/schema/confidence_presence_checker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ def _check_annotation(cls, annotation: Union[ClassificationAnnotation,
3333
VideoClassificationAnnotation,
3434
ScalarMetric,
3535
ConfusionMatrixMetric]):
36-
if annotation.confidence is not None:
36+
37+
if hasattr(annotation, 'confidence') and annotation.confidence is not None:
3738
return True
38-
if annotation.classifications:
39+
if hasattr(annotation, 'classifications') and annotation.classifications:
3940
return any([
4041
cls._check_classification(x) for x in annotation.classifications
4142
])

0 commit comments

Comments
 (0)