From c4d8c861713743f9bab0e95325c2af515a9182e5 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 8 Aug 2015 19:45:59 +0200 Subject: [PATCH] TaskWarrior: Reorder methods --- tasklib/backends.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tasklib/backends.py b/tasklib/backends.py index a4d074e..ad5bd6b 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -144,6 +144,17 @@ class TaskWarrior(object): if self.version < VERSION_2_4_2: self.execute_command(['next'], allow_failure=False) + def merge_with(self, path, push=False): + path = path.rstrip('/') + '/' + self.execute_command(['merge', path], config_override={ + 'merge.autopush': 'yes' if push else 'no', + }) + + def undo(self): + self.execute_command(['undo']) + + # Backend interface implementation + def filter_tasks(self, filter_obj): self.enforce_recurrence() args = ['export', '--'] + filter_obj.get_filter_params() @@ -190,11 +201,3 @@ class TaskWarrior(object): # altering the data before saving task.refresh(after_save=True) - def merge_with(self, path, push=False): - path = path.rstrip('/') + '/' - self.execute_command(['merge', path], config_override={ - 'merge.autopush': 'yes' if push else 'no', - }) - - def undo(self): - self.execute_command(['undo']) -- 2.39.2