Commit 8ade0c20 authored by MinchinWeb's avatar MinchinWeb

Fix PEP257 D400 (selected)

First line should end with a period
parent 3f7c7fda
...@@ -226,7 +226,7 @@ class AddCommandTest(CommandTest): ...@@ -226,7 +226,7 @@ class AddCommandTest(CommandTest):
def test_add_dep09(self): def test_add_dep09(self):
""" """
The text ID shown after adding and after an 'ls' must be equal." The text ID shown after adding and after an 'ls' must be equal.
By appending the parent's projects, the textual ID may change. By appending the parent's projects, the textual ID may change.
""" """
config("test/data/todolist-uid-projects.conf") config("test/data/todolist-uid-projects.conf")
...@@ -249,7 +249,7 @@ class AddCommandTest(CommandTest): ...@@ -249,7 +249,7 @@ class AddCommandTest(CommandTest):
def test_add_dep10(self): def test_add_dep10(self):
""" """
The text ID shown after adding and after an 'ls' must be equal." The text ID shown after adding and after an 'ls' must be equal.
By appending the parent's contexts, the textual ID may change. By appending the parent's contexts, the textual ID may change.
""" """
config("test/data/todolist-uid-contexts.conf") config("test/data/todolist-uid-contexts.conf")
......
...@@ -90,7 +90,7 @@ class FilterTest(TopydoTest): ...@@ -90,7 +90,7 @@ class FilterTest(TopydoTest):
todolist_to_string(reference)) todolist_to_string(reference))
def test_filter09(self): def test_filter09(self):
""" Test instance filter """ """ Test instance filter. """
todos = load_file('test/data/FilterTest1.txt') todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter(todos[2:]) instance_filter = Filter.InstanceFilter(todos[2:])
...@@ -99,7 +99,7 @@ class FilterTest(TopydoTest): ...@@ -99,7 +99,7 @@ class FilterTest(TopydoTest):
self.assertEqual(todos[2:], filtered_todos) self.assertEqual(todos[2:], filtered_todos)
def test_filter10(self): def test_filter10(self):
""" Test instance filter """ """ Test instance filter. """
todos = load_file('test/data/FilterTest1.txt') todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter([]) instance_filter = Filter.InstanceFilter([])
...@@ -108,7 +108,7 @@ class FilterTest(TopydoTest): ...@@ -108,7 +108,7 @@ class FilterTest(TopydoTest):
self.assertEqual([], filtered_todos) self.assertEqual([], filtered_todos)
def test_filter11(self): def test_filter11(self):
""" Test instance filter """ """ Test instance filter. """
todos = load_file('test/data/FilterTest1.txt') todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter(todos[2:]) instance_filter = Filter.InstanceFilter(todos[2:])
......
...@@ -241,7 +241,7 @@ class ListCommandUnicodeTest(CommandTest): ...@@ -241,7 +241,7 @@ class ListCommandUnicodeTest(CommandTest):
self.todolist = load_file_to_todolist("test/data/ListCommandUnicodeTest.txt") self.todolist = load_file_to_todolist("test/data/ListCommandUnicodeTest.txt")
def test_list_unicode1(self): def test_list_unicode1(self):
""" Unicode filters """ """ Unicode filters."""
command = ListCommand([u("\u25c4")], self.todolist, self.out, command = ListCommand([u("\u25c4")], self.todolist, self.out,
self.error) self.error)
command.execute() command.execute()
......
...@@ -28,7 +28,7 @@ class SortCommandTest(CommandTest): ...@@ -28,7 +28,7 @@ class SortCommandTest(CommandTest):
self.todolist = load_file_to_todolist("test/data/SorterTest1.txt") self.todolist = load_file_to_todolist("test/data/SorterTest1.txt")
def test_sort1(self): def test_sort1(self):
""" Alphabetically sorted """ """ Alphabetically sorted. """
command = SortCommand(["text"], self.todolist, self.out, self.error) command = SortCommand(["text"], self.todolist, self.out, self.error)
command.execute() command.execute()
......
...@@ -38,7 +38,7 @@ class SorterTest(TopydoTest): ...@@ -38,7 +38,7 @@ class SorterTest(TopydoTest):
self.assertEqual(todolist_to_string(todos), text_before) self.assertEqual(todolist_to_string(todos), text_before)
def test_sort01(self): def test_sort01(self):
""" Alphabetically sorted """ """ Alphabetically sorted. """
sorter = Sorter('text') sorter = Sorter('text')
self.sort_file('test/data/SorterTest1.txt', self.sort_file('test/data/SorterTest1.txt',
'test/data/SorterTest1-result.txt', sorter) 'test/data/SorterTest1-result.txt', sorter)
...@@ -69,19 +69,19 @@ class SorterTest(TopydoTest): ...@@ -69,19 +69,19 @@ class SorterTest(TopydoTest):
'test/data/SorterTest3-result.txt', sorter) 'test/data/SorterTest3-result.txt', sorter)
def test_sort04(self): def test_sort04(self):
""" Ascendingly sorted by due date """ """ Ascendingly sorted by due date. """
sorter = Sorter(config().tag_due()) sorter = Sorter(config().tag_due())
self.sort_file('test/data/SorterTest4.txt', self.sort_file('test/data/SorterTest4.txt',
'test/data/SorterTest4-result.txt', sorter) 'test/data/SorterTest4-result.txt', sorter)
def test_sort05(self): def test_sort05(self):
""" Descendingly sorted by due date """ """ Descendingly sorted by due date. """
sorter = Sorter('desc:due') sorter = Sorter('desc:due')
self.sort_file('test/data/SorterTest5.txt', self.sort_file('test/data/SorterTest5.txt',
'test/data/SorterTest5-result.txt', sorter) 'test/data/SorterTest5-result.txt', sorter)
def test_sort06(self): def test_sort06(self):
""" Ascendingly sorted by creation date """ """ Ascendingly sorted by creation date. """
sorter = Sorter('creation') sorter = Sorter('creation')
self.sort_file('test/data/SorterTest6.txt', self.sort_file('test/data/SorterTest6.txt',
'test/data/SorterTest6-result.txt', sorter) 'test/data/SorterTest6-result.txt', sorter)
...@@ -93,7 +93,7 @@ class SorterTest(TopydoTest): ...@@ -93,7 +93,7 @@ class SorterTest(TopydoTest):
'test/data/SorterTest7-result.txt', sorter) 'test/data/SorterTest7-result.txt', sorter)
def test_sort08(self): def test_sort08(self):
""" Descendingly sorted by importance """ """ Descendingly sorted by importance. """
sorter = Sorter('desc:importance') sorter = Sorter('desc:importance')
self.sort_file('test/data/SorterTest8.txt', self.sort_file('test/data/SorterTest8.txt',
'test/data/SorterTest8-result.txt', sorter) 'test/data/SorterTest8-result.txt', sorter)
......
...@@ -55,8 +55,7 @@ _SUBCOMMAND_MAP = { ...@@ -55,8 +55,7 @@ _SUBCOMMAND_MAP = {
def get_subcommand(p_args): def get_subcommand(p_args):
""" """
Retrieves the to-be executed Command and returns a tuple Retrieves the to-be executed Command and returns a tuple (Command, args).
(Command, args).
If args is an empty list, then the Command that corresponds with the If args is an empty list, then the Command that corresponds with the
default command specified in the configuration will be returned. default command specified in the configuration will be returned.
......
...@@ -68,7 +68,7 @@ class TagCommand(Command): ...@@ -68,7 +68,7 @@ class TagCommand(Command):
def _choose(self): def _choose(self):
""" """
Returns the chosen number of the tag value to process (or "all") Returns the chosen number of the tag value to process (or "all").
""" """
answer = "all" answer = "all"
......
...@@ -38,8 +38,7 @@ class DirectedGraph(object): ...@@ -38,8 +38,7 @@ class DirectedGraph(object):
def add_edge(self, p_from, p_to, p_id=None): def add_edge(self, p_from, p_to, p_id=None):
""" """
Adds an edge to the graph. The nodes will be added if they don't Adds an edge to the graph. The nodes will be added if they don't exist.
exist.
The p_id is the id of the edge, if the client wishes to maintain this. The p_id is the id of the edge, if the client wishes to maintain this.
""" """
...@@ -61,15 +60,13 @@ class DirectedGraph(object): ...@@ -61,15 +60,13 @@ class DirectedGraph(object):
def incoming_neighbors(self, p_id, p_recursive=False): def incoming_neighbors(self, p_id, p_recursive=False):
""" """
Returns a set of the direct neighbors that can reach the given Returns a set of the direct neighbors that can reach the given node.
node.
""" """
return self.reachable_nodes_reverse(p_id, p_recursive) return self.reachable_nodes_reverse(p_id, p_recursive)
def outgoing_neighbors(self, p_id, p_recursive=False): def outgoing_neighbors(self, p_id, p_recursive=False):
""" """
Returns the set of the direct neighbors that the given node can Returns the set of the direct neighbors that the given node can reach.
reach.
""" """
return self.reachable_nodes(p_id, p_recursive) return self.reachable_nodes(p_id, p_recursive)
......
...@@ -63,7 +63,7 @@ class MultiCommand(ExpressionCommand): ...@@ -63,7 +63,7 @@ class MultiCommand(ExpressionCommand):
self.todos = self._view().todos self.todos = self._view().todos
def get_todos(self): def get_todos(self):
""" Gets todo objects from supplied todo IDs """ """ Gets todo objects from supplied todo IDs. """
if self.is_expression: if self.is_expression:
self.get_todos_from_expr() self.get_todos_from_expr()
else: else:
......
...@@ -114,8 +114,7 @@ class TodoList(TodoListBase): ...@@ -114,8 +114,7 @@ class TodoList(TodoListBase):
""" """
def id_exists(p_id): def id_exists(p_id):
""" """
Returns True if there exists a todo with the given parent Returns True if there exists a todo with the given parent ID.
ID.
""" """
for todo in self._todos: for todo in self._todos:
if todo.has_tag('id', str(p_id)): if todo.has_tag('id', str(p_id)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment