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