]>
git.madduck.net Git - etc/taskwarrior.git/blobdiff - tasklib/task.py
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
class TaskAnnotation(TaskResource):
read_only_fields = ['entry', 'description']
class TaskAnnotation(TaskResource):
read_only_fields = ['entry', 'description']
- def __init__(self, task, data={} ):
+ def __init__(self, task, data=None ):
+ self._load_data(data or dict() )
super(TaskAnnotation, self).__init__(task.warrior)
def remove(self):
super(TaskAnnotation, self).__init__(task.warrior)
def remove(self):
self.tasks = TaskQuerySet(self)
self.tasks = TaskQuerySet(self)
- def _get_command_args(self, args, config_override={} ):
+ def _get_command_args(self, args, config_override=None ):
command_args = ['task', 'rc:{0}'.format(self.taskrc_location)]
config = self.config.copy()
command_args = ['task', 'rc:{0}'.format(self.taskrc_location)]
config = self.config.copy()
- config.update(config_override)
+ config.update(config_override or dict() )
for item in config.items():
command_args.append('rc.{0}={1}'.format(*item))
command_args.extend(map(six.text_type, args))
for item in config.items():
command_args.append('rc.{0}={1}'.format(*item))
command_args.extend(map(six.text_type, args))
- def execute_command(self, args, config_override={} , allow_failure=True,
+ def execute_command(self, args, config_override=None , allow_failure=True,
return_all=False):
command_args = self._get_command_args(
args, config_override=config_override)
return_all=False):
command_args = self._get_command_args(
args, config_override=config_override)