Commit 4534caa0 authored by MinchinWeb's avatar MinchinWeb

Fix PEP8 E261

at least two spaces before inline comment
parent 4c81766f
......@@ -73,7 +73,7 @@ class DeleteCommandTest(CommandTest):
command.execute()
self.assertTrue(self.todolist.is_dirty())
self.assertEqual(self.todolist.count(), 3) # force won't delete subtasks
self.assertEqual(self.todolist.count(), 3) # force won't delete subtasks
self.assertEqual(self.output, "| 2| Bar p:1\nRemoved: Foo id:1\n")
self.assertEqual(self.errors, "")
......@@ -82,7 +82,7 @@ class DeleteCommandTest(CommandTest):
command.execute()
self.assertTrue(self.todolist.is_dirty())
self.assertEqual(self.todolist.count(), 3) # force won't delete subtasks
self.assertEqual(self.todolist.count(), 3) # force won't delete subtasks
self.assertEqual(self.output, "| 2| Bar p:1\nRemoved: Foo id:1\n")
self.assertEqual(self.errors, "")
......
......@@ -163,7 +163,7 @@ class EditCommandTest(CommandTest):
os.environ['EDITOR'] = editor
todotxt = config().todotxt()
result = self.todolist.print_todos() # copy TodoList content *before* executing command
result = self.todolist.print_todos() # copy TodoList content *before* executing command
command = EditCommand([], self.todolist, self.out, self.error, None)
command.execute()
......
......@@ -32,7 +32,7 @@ _SUBCOMMAND_MAP = {
'depri': 'DepriCommand',
'do': 'DoCommand',
'edit': 'EditCommand',
'exit': 'ExitCommand', # used for the prompt
'exit': 'ExitCommand', # used for the prompt
'ls': 'ListCommand',
'lscon': 'ListContextCommand',
'listcon': 'ListContextCommand',
......
......@@ -174,9 +174,9 @@ class CLIApplicationBase(object):
def _help(self, args):
if args == None:
pass # TODO
pass # TODO
else:
pass # TODO
pass # TODO
def _input(self):
"""
......
......@@ -43,7 +43,7 @@ class ListCommand(ExpressionCommand):
"""
try:
import icalendar as _
except ImportError: # pragma: no cover
except ImportError: # pragma: no cover
self.error("icalendar package is not installed.")
return False
......@@ -96,7 +96,7 @@ class ListCommand(ExpressionCommand):
try:
self._process_flags()
except SyntaxError: # pragma: no cover
except SyntaxError: # pragma: no cover
# importing icalendar failed, most likely due to Python 3.2
self.error("icalendar is not supported in this Python version.")
return False
......
......@@ -35,7 +35,7 @@ class SortCommand(Command):
except InvalidCommandArgument:
expression = config().sort_string()
sorter = Sorter(expression) # TODO: validate
sorter = Sorter(expression) # TODO: validate
sorted_todos = sorter.sort(self.todolist.todos())
self.todolist.erase()
......
......@@ -35,7 +35,7 @@ class DCommand(MultiCommand):
self.force = False
self.length = len(self.todolist.todos()) # to determine newly activated todos
self.length = len(self.todolist.todos()) # to determine newly activated todos
def get_flags(self):
return ("f", ["force"])
......
......@@ -23,8 +23,8 @@ from hashlib import sha1
_TABLE_SIZES = {
# we choose a large table size to reduce the chance of collisions.
3: 46649, # largest prime under zzz_36
4: 1679609 # largest prime under zzzz_36
3: 46649, # largest prime under zzz_36
4: 1679609 # largest prime under zzzz_36
}
def _to_base36(p_value):
......
......@@ -69,7 +69,7 @@ class IcalPrinter(Printer):
try:
import icalendar
self.icalendar = icalendar
except ImportError: # pragma: no cover
except ImportError: # pragma: no cover
self.icalendar = None
def print_list(self, p_todos):
......
......@@ -37,7 +37,7 @@ class TodoList(TodoListBase):
The string will be parsed.
"""
# initialize these first because the constructor calls add_list
self._tododict = {} # hash(todo) to todo lookup
self._tododict = {} # hash(todo) to todo lookup
self._depgraph = DirectedGraph()
super(TodoList, self).__init__(p_todostrings)
......
......@@ -75,7 +75,7 @@ class TodoListBase(object):
try:
result = self._id_todo_map[p_identifier]
except KeyError:
pass # we'll try something else
pass # we'll try something else
return result
......
......@@ -32,9 +32,9 @@ def date_string_to_date(p_date):
parsed_date = re.match(r'(\d{4})-(\d{2})-(\d{2})', p_date)
if parsed_date:
result = date(
int(parsed_date.group(1)), # year
int(parsed_date.group(2)), # month
int(parsed_date.group(3)) # day
int(parsed_date.group(1)), # year
int(parsed_date.group(2)), # month
int(parsed_date.group(3)) # day
)
else:
raise ValueError
......
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