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):
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.
"""
config("test/data/todolist-uid-projects.conf")
......@@ -249,7 +249,7 @@ class AddCommandTest(CommandTest):
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.
"""
config("test/data/todolist-uid-contexts.conf")
......
......@@ -90,7 +90,7 @@ class FilterTest(TopydoTest):
todolist_to_string(reference))
def test_filter09(self):
""" Test instance filter """
""" Test instance filter. """
todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter(todos[2:])
......@@ -99,7 +99,7 @@ class FilterTest(TopydoTest):
self.assertEqual(todos[2:], filtered_todos)
def test_filter10(self):
""" Test instance filter """
""" Test instance filter. """
todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter([])
......@@ -108,7 +108,7 @@ class FilterTest(TopydoTest):
self.assertEqual([], filtered_todos)
def test_filter11(self):
""" Test instance filter """
""" Test instance filter. """
todos = load_file('test/data/FilterTest1.txt')
instance_filter = Filter.InstanceFilter(todos[2:])
......
......@@ -241,7 +241,7 @@ class ListCommandUnicodeTest(CommandTest):
self.todolist = load_file_to_todolist("test/data/ListCommandUnicodeTest.txt")
def test_list_unicode1(self):
""" Unicode filters """
""" Unicode filters."""
command = ListCommand([u("\u25c4")], self.todolist, self.out,
self.error)
command.execute()
......
......@@ -28,7 +28,7 @@ class SortCommandTest(CommandTest):
self.todolist = load_file_to_todolist("test/data/SorterTest1.txt")
def test_sort1(self):
""" Alphabetically sorted """
""" Alphabetically sorted. """
command = SortCommand(["text"], self.todolist, self.out, self.error)
command.execute()
......
......@@ -38,7 +38,7 @@ class SorterTest(TopydoTest):
self.assertEqual(todolist_to_string(todos), text_before)
def test_sort01(self):
""" Alphabetically sorted """
""" Alphabetically sorted. """
sorter = Sorter('text')
self.sort_file('test/data/SorterTest1.txt',
'test/data/SorterTest1-result.txt', sorter)
......@@ -69,19 +69,19 @@ class SorterTest(TopydoTest):
'test/data/SorterTest3-result.txt', sorter)
def test_sort04(self):
""" Ascendingly sorted by due date """
""" Ascendingly sorted by due date. """
sorter = Sorter(config().tag_due())
self.sort_file('test/data/SorterTest4.txt',
'test/data/SorterTest4-result.txt', sorter)
def test_sort05(self):
""" Descendingly sorted by due date """
""" Descendingly sorted by due date. """
sorter = Sorter('desc:due')
self.sort_file('test/data/SorterTest5.txt',
'test/data/SorterTest5-result.txt', sorter)
def test_sort06(self):
""" Ascendingly sorted by creation date """
""" Ascendingly sorted by creation date. """
sorter = Sorter('creation')
self.sort_file('test/data/SorterTest6.txt',
'test/data/SorterTest6-result.txt', sorter)
......@@ -93,7 +93,7 @@ class SorterTest(TopydoTest):
'test/data/SorterTest7-result.txt', sorter)
def test_sort08(self):
""" Descendingly sorted by importance """
""" Descendingly sorted by importance. """
sorter = Sorter('desc:importance')
self.sort_file('test/data/SorterTest8.txt',
'test/data/SorterTest8-result.txt', sorter)
......
......@@ -55,8 +55,7 @@ _SUBCOMMAND_MAP = {
def get_subcommand(p_args):
"""
Retrieves the to-be executed Command and returns a tuple
(Command, args).
Retrieves the to-be executed Command and returns a tuple (Command, args).
If args is an empty list, then the Command that corresponds with the
default command specified in the configuration will be returned.
......
......@@ -68,7 +68,7 @@ class TagCommand(Command):
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"
......
......@@ -38,8 +38,7 @@ class DirectedGraph(object):
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
exist.
Adds an edge to the graph. The nodes will be added if they don't exist.
The p_id is the id of the edge, if the client wishes to maintain this.
"""
......@@ -61,15 +60,13 @@ class DirectedGraph(object):
def incoming_neighbors(self, p_id, p_recursive=False):
"""
Returns a set of the direct neighbors that can reach the given
node.
Returns a set of the direct neighbors that can reach the given node.
"""
return self.reachable_nodes_reverse(p_id, p_recursive)
def outgoing_neighbors(self, p_id, p_recursive=False):
"""
Returns the set of the direct neighbors that the given node can
reach.
Returns the set of the direct neighbors that the given node can reach.
"""
return self.reachable_nodes(p_id, p_recursive)
......
......@@ -63,7 +63,7 @@ class MultiCommand(ExpressionCommand):
self.todos = self._view().todos
def get_todos(self):
""" Gets todo objects from supplied todo IDs """
""" Gets todo objects from supplied todo IDs. """
if self.is_expression:
self.get_todos_from_expr()
else:
......
......@@ -114,8 +114,7 @@ class TodoList(TodoListBase):
"""
def id_exists(p_id):
"""
Returns True if there exists a todo with the given parent
ID.
Returns True if there exists a todo with the given parent ID.
"""
for todo in self._todos:
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