From: Tomas Babej Date: Sat, 26 Dec 2015 15:35:01 +0000 (+0100) Subject: SerializingObject: Serialize tags into sets, not lists X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/5ec1eb1a779c700a7abd88f4cc51940b036c50b8?hp=--cc SerializingObject: Serialize tags into sets, not lists --- 5ec1eb1a779c700a7abd88f4cc51940b036c50b8 diff --git a/tasklib/serializing.py b/tasklib/serializing.py index 4594285..ff9b977 100644 --- a/tasklib/serializing.py +++ b/tasklib/serializing.py @@ -178,8 +178,8 @@ class SerializingObject(object): def deserialize_tags(self, tags): if isinstance(tags, six.string_types): - return tags.split(',') if tags else [] - return tags or [] + return set(tags.split(',')) if tags else set() + return set(tags or []) def serialize_depends(self, value): # Return the list of uuids