Example #1
0
    def __init__(self, p_todostrings):
        """
        Should be given a list of strings, each element a single todo string.
        The string will be parsed.
        """
        # initialize these first because the constructor calls add_list
        self._tododict = {}  # hash(todo) to todo lookup
        self._depgraph = DirectedGraph()

        super(TodoList, self).__init__(p_todostrings)
Example #2
0
    def setUp(self):
        super().setUp()

        self.graph = DirectedGraph()

        self.graph.add_edge(1, 2, 1)
        self.graph.add_edge(2, 4, "Test")
        self.graph.add_edge(4, 3)
        self.graph.add_edge(4, 6)
        self.graph.add_edge(6, 2)
        self.graph.add_edge(1, 3)
        self.graph.add_edge(3, 5)
Example #3
0
    def __init__(self, p_todostrings):
        """
        Should be given a list of strings, each element a single todo string.
        The string will be parsed.
        """
        self._todos = []
        self._tododict = {}  # hash(todo) to todo lookup
        self._depgraph = DirectedGraph()
        self._todo_id_map = {}
        self._id_todo_map = {}

        self.add_list(p_todostrings)
        self.dirty = False