Commit 40f02d4f authored by Bram Schoenmakers's avatar Bram Schoenmakers

Rename method for consistency.

parent f05da0e2
......@@ -27,7 +27,7 @@ class Command(object):
p_args is a list of arguments that can be passed to this subcommand.
These can be retrieved with argument(), or the existence of an argument
using argumentShift().
using argument_shift().
p_todolist is a reference to the todolist instance to operate on.
......@@ -53,7 +53,7 @@ class Command(object):
Execute the command. Intercepts the help subsubcommand to show the help
text.
"""
if self.argumentShift("help"):
if self.argument_shift("help"):
self.error(self.usage() + "\n\n" + self.help())
return False
......@@ -69,7 +69,7 @@ class Command(object):
return value
def argumentShift(self, p_expr):
def argument_shift(self, p_expr):
"""
Returns true when the first argument equals the given expression.
"""
......
......@@ -30,7 +30,7 @@ class DoCommand(Command):
super(DoCommand, self).__init__(p_args, p_todolist, p_out, p_err, p_prompt)
self.number = None
self.force = self.argumentShift("--force") or self.argumentShift("-f")
self.force = self.argument_shift("--force") or self.argument_shift("-f")
try:
self.number = convert_todo_number(self.argument(0))
......
......@@ -30,7 +30,7 @@ class ListCommand(Command.Command):
if not super(ListCommand, self).execute():
return False
show_all = self.argumentShift("-x")
show_all = self.argument_shift("-x")
sorter = Sorter.Sorter(Config.SORT_STRING)
filters = [] if show_all else [Filter.DependencyFilter(self.todolist), Filter.RelevanceFilter()]
......
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