示例#1
0
 def time_conflict(self, schedule):
     """Internal use. Determines when the given time range conflicts with the set of
     excluded time ranges.
     """
     if is_nil(schedule):
         return True
     for timerange in self._excluded_times:
         if timerange.conflicts_with(schedule):
             return False
     return True
示例#2
0
def section_constraint(section1, section2):
    return is_nil(section1) or is_nil(section2) or not section1.conflicts_with(section2)
示例#3
0
def section_constraint(section1, section2):
    if is_nil(section1) or is_nil(section2):
        return True
    return not section1.conflicts_with(section2)
示例#4
0
文件: domain.py 项目: jinz/YACS
 def __call__(self, section1, section2):
     if is_nil(section1) or is_nil(section2):
         return True
     self.section_conflicts(section1.id, section2.id)