Skip to content

Commit 4b1373e

Browse files
RonMcKaytbabej
authored andcommitted
Refactor issubset/issuperset in LazyUUIDTaskSet
The two methods now use the comparison operators defined by `set`
1 parent de04c87 commit 4b1373e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tasklib/lazy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ def __gt__(self, other):
172172
return self._uuids > set(t['uuid'] for t in other)
173173

174174
def issubset(self, other):
175-
return all([task in other for task in self])
175+
return self._uuids <= set(t['uuid'] for t in other)
176176

177177
def issuperset(self, other):
178-
return all([task in self for task in other])
178+
return self._uuids >= set(t['uuid'] for t in other)
179179

180180
def union(self, other):
181181
return LazyUUIDTaskSet(

0 commit comments

Comments
 (0)