X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/0e325085d7cebbba5f301d472e83ce0ba58d1f15..0e45c41ab8685abd3d1954912d8bd6f8fdf6637a:/tasklib/lazy.py diff --git a/tasklib/lazy.py b/tasklib/lazy.py index aa2c065..f9e0c0a 100644 --- a/tasklib/lazy.py +++ b/tasklib/lazy.py @@ -36,12 +36,21 @@ class LazyUUIDTask(object): # For saved Tasks, just define equality by equality of uuids return self['uuid'] == other['uuid'] + def __ne__(self, other): + return not self.__eq__(other) + def __hash__(self): return self['uuid'].__hash__() def __repr__(self): return "LazyUUIDTask: {0}".format(self._uuid) + def __copy__(self): + return LazyUUIDTask(self._tw, self._uuid) + + def __deepcopy__(self, memo): + return LazyUUIDTask(self._tw, self._uuid) + @property def saved(self): """