ruff format fixes
Formatting Check / formatting-check (pull_request) Successful in 53s
Python Code Quality / python-code-quality (pull_request) Successful in 15s
Python Test / python-test (pull_request) Successful in 45s

This commit is contained in:
Brian Bjarke Jensen
2025-09-21 19:40:01 +02:00
parent 7e9c4474ac
commit cbac5ded35
2 changed files with 34 additions and 24 deletions
@@ -60,17 +60,27 @@ class AnnotationRepository(MinioAdapter, AnnotationRepositoryInterface):
annotation = Annotation(
angle=AngleEnum(data["angle"]) if data["angle"] is not None else None,
angle_uncertainty=bool(data["angle_uncertainty"]),
colour=ColourEnum(data["colour"]) if data["colour"] is not None else None,
colour=ColourEnum(data["colour"])
if data["colour"] is not None
else None,
colour_uncertainty=bool(data["colour_uncertainty"]),
contact=ContactEnum(data["contact"]) if data["contact"] is not None else None,
contact=ContactEnum(data["contact"])
if data["contact"] is not None
else None,
contact_uncertainty=bool(data["contact_uncertainty"]),
depth=DepthEnum(data["depth"]) if data["depth"] is not None else None,
depth_uncertainty=bool(data["depth_uncertainty"]),
distance=DistanceEnum(data["distance"]) if data["distance"] is not None else None,
distance=DistanceEnum(data["distance"])
if data["distance"] is not None
else None,
distance_uncertainty=bool(data["distance_uncertainty"]),
lighting=LightingEnum(data["lighting"]) if data["lighting"] is not None else None,
lighting=LightingEnum(data["lighting"])
if data["lighting"] is not None
else None,
lighting_uncertainty=bool(data["lighting_uncertainty"]),
point_of_view=PointOfViewEnum(data["point_of_view"]) if data["point_of_view"] is not None else None,
point_of_view=PointOfViewEnum(data["point_of_view"])
if data["point_of_view"] is not None
else None,
point_of_view_uncertainty=bool(data["point_of_view_uncertainty"]),
)
except (KeyError, ValueError) as e: