Commit 4204a657 authored by MinchinWeb's avatar MinchinWeb

Fix PEP257 D204

1 blank line required after class docstring
parent 4ced8447
......@@ -26,6 +26,7 @@ class JsonPrinterTest(TopydoTest):
Tests the functionality of printing a single todo item. Printing a list is
already covered by the ListCommand tests.
"""
def test_json(self):
""" Print a single todo item. """
printer = JsonPrinter()
......
......@@ -39,6 +39,7 @@ class CLIApplication(CLIApplicationBase):
"""
Class that represents the (original) Command Line Interface of Topydo.
"""
def __init__(self):
super(CLIApplication, self).__init__()
......
......@@ -115,6 +115,7 @@ class CLIApplicationBase(object):
Handles input/output of the various subcommands.
"""
def __init__(self):
self.todolist = TodoList.TodoList([])
self.todofile = None
......
......@@ -56,6 +56,7 @@ class PromptApplication(CLIApplicationBase):
This class implements a variant of topydo's CLI showing a shell and
offering auto-completion thanks to the prompt toolkit.
"""
def __init__(self):
super(PromptApplication, self).__init__()
......
......@@ -86,6 +86,7 @@ class TopydoCompleter(Completer):
Completer class that completes projects, contexts, dates and
subcommands.
"""
def __init__(self, p_todolist):
self.todolist = p_todolist
......
......@@ -24,6 +24,7 @@ class ExitCommand(Command):
A command that exits topydo. Used for the 'exit' and 'quit' subcommands on
the prompt CLI.
"""
def __init__(self, p_args, p_todolist, p_output, p_error, p_input):
super(ExitCommand, self).__init__(p_args, p_todolist, p_output, p_error,
p_input)
......
......@@ -27,6 +27,7 @@ class ExpressionCommand(Command):
"""
A common class for commands operating on todos selected by expressions.
"""
def __init__(self, p_args, p_todolist,
p_out=lambda a: None,
p_err=lambda a: None,
......
......@@ -108,6 +108,7 @@ class RelevanceFilter(Filter):
class DependencyFilter(Filter):
""" Matches when a todo has no unfinished child tasks. """
def __init__(self, p_todolist):
"""
Constructor.
......@@ -164,9 +165,8 @@ OPERATOR_MATCH = r"(?P<operator><=?|=|>=?|!)?"
class OrdinalFilter(Filter):
"""
Base class for ordinal filters.
"""
""" Base class for ordinal filters. """
def __init__(self, p_expression, p_pattern):
super(OrdinalFilter, self).__init__()
......
......@@ -22,6 +22,7 @@ class DirectedGraph(object):
Represents a simple directed graph, used for tracking todo
dependencies. The nodes are very simple: just integers.
"""
def __init__(self):
self._edges = {}
self._edge_numbers = {}
......
......@@ -64,6 +64,7 @@ class IcalPrinter(Printer):
https://www.rfc-editor.org/rfc/rfc2445.txt
"""
def __init__(self, p_todolist):
super(IcalPrinter, self).__init__()
self.todolist = p_todolist
......
......@@ -50,6 +50,7 @@ class JsonPrinter(Printer):
"""
A printer that converts a list of Todo items to a string in JSON format.
"""
def __init__(self):
super(JsonPrinter, self).__init__()
......
......@@ -24,6 +24,7 @@ class Printer(object):
Subclasses must at least implement the print_todo method.
"""
def print_todo(self, p_todo):
raise NotImplementedError
......@@ -44,6 +45,7 @@ class PrettyPrinter(Printer):
add colors, indentation, etc. These filters are found in the
PrettyPrinterFilter module.
"""
def __init__(self):
"""
Constructor.
......
......@@ -90,6 +90,7 @@ class PrettyPrinterColorFilter(PrettyPrinterFilter):
class PrettyPrinterIndentFilter(PrettyPrinterFilter):
""" Adds indentation to the todo item. """
def __init__(self, p_indent=0):
super(PrettyPrinterIndentFilter, self).__init__()
self.indent = p_indent
......@@ -101,6 +102,7 @@ class PrettyPrinterIndentFilter(PrettyPrinterFilter):
class PrettyPrinterNumbers(PrettyPrinterFilter):
""" Prepends the todo's number, retrieved from the todolist. """
def __init__(self, p_todolist):
super(PrettyPrinterNumbers, self).__init__()
self.todolist = p_todolist
......@@ -112,6 +114,7 @@ class PrettyPrinterNumbers(PrettyPrinterFilter):
class PrettyPrinterHideTagFilter(PrettyPrinterFilter):
""" Removes all occurrences of the given tags from the text. """
def __init__(self, p_hidden_tags):
super(PrettyPrinterHideTagFilter, self).__init__()
self.hidden_tags = p_hidden_tags
......
......@@ -86,6 +86,7 @@ class Sorter(object):
specific search is done first. This relies on the fact that sorting is
stable.
"""
def __init__(self, p_sortstring="desc:priority"):
self.sortstring = p_sortstring
self.functions = []
......
......@@ -23,6 +23,7 @@ class View(object):
file. Also a sorter and a list of filters should be given that is applied
to the list.
"""
def __init__(self, p_sorter, p_filters, p_todolist):
self._todolist = p_todolist
self._sorter = p_sorter
......
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