X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/f58549e864220709de81b141b0343195e70fc6f5..516b8d6c03058552cfe7c3bfda4362640a3077e1:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index 6e3e432..c7c9e6d 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -15,6 +15,7 @@ PENDING = 'pending' COMPLETED = 'completed' DELETED = 'deleted' WAITING = 'waiting' +RECURRING = 'recurring' logger = logging.getLogger(__name__) @@ -309,6 +310,10 @@ class Task(TaskResource): def pending(self): return self['status'] == six.text_type('pending') + @property + def recurring(self): + return self['status'] == six.text_type('recurring') + @property def active(self): return self['start'] is not None @@ -518,6 +523,9 @@ class TaskQuerySet(object): def waiting(self): return self.filter(status=WAITING) + def recurring(self): + return self.filter(status=RECURRING) + def filter(self, *args, **kwargs): """ Returns a new TaskQuerySet with the given filters added.