You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a deployment script, compare a Schedule on the server to a proposed Schedule, and skip schedule updates as needed.
Describe the bug
When comparing two Schedules that differ only in their ScheduleOverlapPolicy, Schedule.__eq__ returns true.
This seems to be caused by ScheduleOverlapPolicy, where every enum case apparently equals to any cases according to ScheduleOverlapPolicy.__eq__, even though the underlying values are different.
For some reason, ScheduleOverlapPolicy is both a dataclass and an IntEnum. Seems like the rare combination might have caused the behaviour here?
What are you really trying to do?
In a deployment script, compare a
Schedule
on the server to a proposedSchedule
, and skip schedule updates as needed.Describe the bug
When comparing two
Schedule
s that differ only in theirScheduleOverlapPolicy
,Schedule.__eq__
returns true.This seems to be caused by
ScheduleOverlapPolicy
, where every enum case apparently equals to any cases according toScheduleOverlapPolicy.__eq__
, even though the underlying values are different.For some reason,
ScheduleOverlapPolicy
is both a dataclass and an IntEnum. Seems like the rare combination might have caused the behaviour here?Minimal Reproduction
Environment/Versions
Python 3.11.7
Additional context
The text was updated successfully, but these errors were encountered: