Skip to content
Snippets Groups Projects
Verified Commit ae4297b6 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: simplify comparisons of start & end of timeslots

parent 03020542
No related branches found
No related tags found
No related merge requests found
......@@ -668,7 +668,7 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts:
solution_choices.add("theirs")
solution_choices.add("ours")
# Partly overlapping: projected starts earlier than existing and ends earlier
# Partly overlapping: timeslot start before existing start, end before existing end
#
# ex. pr.
# +--+
......@@ -678,11 +678,11 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts:
# | |
# +--+
#
if timeslot.end > existing.start > timeslot.start <= existing.end:
if timeslot.start < existing.start and timeslot.end < existing.end:
solution_choices.add("theirs-end")
solution_choices.add("ours-end")
# Partly overlapping: projected starts later than existing and ends later
# Partly overlapping: timeslot start after existing start, end after existing ends
#
# ex. pr.
# +--+
......@@ -692,11 +692,11 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts:
# | |
# +--+
#
if existing.start <= timeslot.start < existing.end < timeslot.end:
if timeslot.start > existing.start and timeslot.end > existing.end:
solution_choices.add("theirs-start")
solution_choices.add("ours-start")
# Fully overlapping/Superset: projected starts earlier and ends later than existing
# Fully overlapping: timeslot start before existing start, end after existing end
#
# ex. pr.
# +--+
......@@ -710,7 +710,7 @@ def generate_conflicts(timeslots: list[TimeSlot]) -> Conflicts:
solution_choices.add("theirs-start")
solution_choices.add("theirs-both")
# Fully overlapping/Subset: projected starts later and ends earlier than existing
# Fully overlapping: timeslot start after existing start, end before existing end
#
# ex. pr.
# +--+
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment