X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/73cb96ecbbcaf43f05dc825a1017c2680b79f5a9..e9ac4a95bfab8a3e323e15f5f26a6302a87384a3:/tasklib/backends.py diff --git a/tasklib/backends.py b/tasklib/backends.py index 2a00dee..0d01470 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -5,6 +5,9 @@ import re import subprocess from tasklib.filters import TaskWarriorFilter +from tasklib.serializing import local_zone + +DATE_FORMAT_CALC = '%Y-%m-%dT%H:%M:%S' VERSION_2_1_0 = six.u('2.1.0') VERSION_2_2_0 = six.u('2.2.0') @@ -19,7 +22,10 @@ VERSION_2_4_5 = six.u('2.4.5') class Backend(object): - filter_class = TaskWarriorFilter + @abc.abstractproperty + def filter_class(self): + """Returns the TaskFilter class used by this backend""" + pass @abc.abstractmethod def filter_tasks(self, filter_obj): @@ -205,6 +211,10 @@ class TaskWarrior(object): "datetime, its type is not supported: {}" .format(type(value))) + @property + def filter_class(self): + return TaskWarriorFilter + # Public interface def get_config(self):