Code Duplication    Length = 7-9 lines in 2 locations

ActionTree/__init__.py 2 locations

@@ 595-603 (lines=9) @@
592
        def max_time(self):
593
            return self.__success_time
594
595
        def draw(self, ax, ordinates, actions):
596
            ordinate = ordinates[self.__id]
597
            ax.plot([self.__ready_time, self.__start_time], [ordinate, ordinate], color="blue", lw=1)
598
            # @todo Use an other end-style to avoid pixels before/after min/max_time
599
            ax.plot([self.__start_time, self.__success_time], [ordinate, ordinate], color="blue", lw=4)
600
            # @todo Make sure the text is not outside the plot on the right
601
            ax.annotate(self.__label, xy=(self.__start_time, ordinate), xytext=(0, 3), textcoords="offset points")
602
            for d in self.__dependencies:
603
                ax.plot([actions[d].max_time, self.min_time], [ordinates[d], ordinate], "k:", lw=1)
604
605
    class FailedAction(object):
606
        def __init__(self, action, status):
@@ 622-628 (lines=7) @@
619
        def max_time(self):
620
            return self.__failure_time
621
622
        def draw(self, ax, ordinates, actions):
623
            ordinate = ordinates[self.__id]
624
            ax.plot([self.__ready_time, self.__start_time], [ordinate, ordinate], color="red", lw=1)
625
            ax.plot([self.__start_time, self.__failure_time], [ordinate, ordinate], color="red", lw=4)
626
            ax.annotate(self.__label, xy=(self.__start_time, ordinate), xytext=(0, 3), textcoords="offset points")
627
            for d in self.__dependencies:
628
                ax.plot([actions[d].max_time, self.min_time], [ordinates[d], ordinate], "k:", lw=1)
629
630
    class CanceledAction(object):
631
        def __init__(self, action, status):