Skip to content

Commit

Permalink
running ruff check format
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Imperio authored and Felipe Imperio committed Nov 15, 2024
1 parent 9482b10 commit 51e879a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/apps/activities/domain/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class SliderConditionType(StrEnum):
class FieldNamePayloadType(StrEnum):
FROM = "from"
TO = "to"



class TimePayloadType(StrEnum):
START_TIME = "startTime"
END_TIME = "endTime"
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 51e879a

Please sign in to comment.