From 51e879a527194fee69ca93265f6dcbcb516f0493 Mon Sep 17 00:00:00 2001 From: Felipe Imperio Date: Thu, 14 Nov 2024 16:42:34 -0800 Subject: [PATCH] running ruff check format --- src/apps/activities/domain/conditions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/activities/domain/conditions.py b/src/apps/activities/domain/conditions.py index 68e4e0d5fc7..1770395fb78 100644 --- a/src/apps/activities/domain/conditions.py +++ b/src/apps/activities/domain/conditions.py @@ -90,7 +90,8 @@ class SliderConditionType(StrEnum): class FieldNamePayloadType(StrEnum): FROM = "from" TO = "to" - + + class TimePayloadType(StrEnum): START_TIME = "startTime" END_TIME = "endTime" @@ -173,7 +174,7 @@ def validate_field_name(cls, v): if v is not None and v not in FieldNamePayloadType.__members__.values(): raise ValueError(f"{v} is not a valid FieldNamePayloadType value.") return v - + def dict(self, *args, **kwargs): d = super().dict(*args, **kwargs) d["value"] = self.value.strftime("%H:%M") @@ -191,7 +192,7 @@ def validate_field_name(cls, v): if v is not None and v not in FieldNamePayloadType.__members__.values(): raise ValueError(f"{v} is not a valid FieldNamePayloadType value.") return v - + @root_validator(pre=True) def validate_time(cls, values: Dict[str, Any]) -> Dict[str, Any]: time_value = values.get("time") @@ -259,7 +260,7 @@ def validate_field_name(cls, v): if v is not None and v not in FieldNamePayloadType.__members__.values(): raise ValueError(f"{v} is not a valid FieldNamePayloadType value.") return v - + @root_validator(pre=True) def validate_times(cls, values: Dict[str, Any]) -> Dict[str, Any]: min_time_dict = values.get("minTime")