X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/73b53d933f2285aaa2ecf1672be44eabf2979316..87cd94826c2d97e4561219d15bd0c7d9e19e3d4a:/tasklib/backends.py diff --git a/tasklib/backends.py b/tasklib/backends.py index 6bba35d..12144f5 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -1,4 +1,5 @@ import abc +import copy import datetime import json import logging @@ -80,7 +81,7 @@ class TaskWarriorException(Exception): pass -class TaskWarrior(object): +class TaskWarrior(Backend): VERSION_2_1_0 = six.u('2.1.0') VERSION_2_2_0 = six.u('2.2.0') @@ -186,8 +187,8 @@ class TaskWarrior(object): old_dependencies = task._original_data.get('depends', set()) - added = self['depends'] - old_dependencies - removed = old_dependencies - self['depends'] + added = task['depends'] - old_dependencies + removed = old_dependencies - task['depends'] # Removed dependencies need to be prefixed with '-' return 'depends:' + ','.join( @@ -217,6 +218,8 @@ class TaskWarrior(object): "datetime, its type is not supported: {}" .format(type(value))) + return localized + @property def filter_class(self): return TaskWarriorFilter