From 3e74cb3326bf929fe57ac726997256f3780ba46f Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 9 Aug 2015 00:45:26 +0200 Subject: [PATCH] backends: Make the filter_class an abstractproperty --- tasklib/backends.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tasklib/backends.py b/tasklib/backends.py index fe24fd2..0d01470 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -22,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): @@ -208,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): -- 2.39.5