Commit 89707f4e authored by Jacek Sowiński's avatar Jacek Sowiński

MultiCommand.execute_* methods are now private

- execute_multi_specific() -> _execute_multi_specific()
- execute_not_multi() -> _execute_not_multi()
parent 4efef4ec
......@@ -25,7 +25,7 @@ class DepriCommand(MultiCommand):
super(DepriCommand, self).__init__(
p_args, p_todolist, p_out, p_err, p_prompt)
def execute_multi_specific(self):
def _execute_multi_specific(self):
self.printer.add_filter(PrettyPrinterNumbers(self.todolist))
for todo in self.todos:
......
......@@ -101,7 +101,7 @@ class EditCommand(MultiCommand):
else:
return None
def execute_multi_specific(self):
def _execute_multi_specific(self):
self.printer.add_filter(PrettyPrinterNumbers(self.todolist))
temp_todos = self._todos_to_temp()
......@@ -121,7 +121,7 @@ class EditCommand(MultiCommand):
else:
self.error(self.usage())
def execute_not_multi(self):
def _execute_not_multi(self):
if self.edit_archive:
archive = config().archive()
......
......@@ -40,7 +40,7 @@ class PostponeCommand(MultiCommand):
if p_opt == '-s':
self.move_start_date = True
def execute_multi_specific(self):
def _execute_multi_specific(self):
def _get_offset(p_todo):
offset = p_todo.tag_value(
config().tag_due(), date.today().isoformat())
......
......@@ -28,7 +28,7 @@ class PriorityCommand(MultiCommand):
self.last_argument = True
def execute_multi_specific(self):
def _execute_multi_specific(self):
priority = None
priority = self.args[-1]
......
......@@ -113,7 +113,7 @@ class DCommand(MultiCommand):
"""
pass
def execute_multi_specific(self):
def _execute_multi_specific(self):
old_active = self._active_todos()
for todo in self.todos:
......
......@@ -100,14 +100,14 @@ class MultiCommand(ExpressionCommand):
else:
return None
def execute_multi_specific(self):
def _execute_multi_specific(self):
"""
Operations specific for particular command dealing with multiple todo
IDs.
"""
pass
def execute_not_multi(self):
def _execute_not_multi(self):
"""
Some commands can do something else besides operating on multiple todo
IDs. This method is a wrapper for those other operations.
......@@ -121,13 +121,13 @@ class MultiCommand(ExpressionCommand):
self._process_flags()
if not self.multi_mode:
self.execute_not_multi()
self._execute_not_multi()
else:
self.get_todos()
todo_errors = self._catch_todo_errors()
if not todo_errors:
self.execute_multi_specific()
self._execute_multi_specific()
else:
for error in todo_errors:
self.error(error)
......
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