pylint: Fix consider-using-set-comprehension lint error
Python3 introduces set comprehension which is similar to dictionary
comprehension, and that help us get rid of "list comprehension + set
type conversion" combination.
BUG=b:158811392
TEST=make lint && make test
Change-Id: Ifd1cb73f458c0d893a09aab5d31469db00410045
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/factory/+/2247964
Reviewed-by: Yilin Yang (kerker) <kerker@chromium.org>
Tested-by: Fei Shao <fshao@chromium.org>
Commit-Queue: Fei Shao <fshao@chromium.org>
diff --git a/py/utils/pygpt.py b/py/utils/pygpt.py
index 76fe49d..bd60abf 100755
--- a/py/utils/pygpt.py
+++ b/py/utils/pygpt.py
@@ -317,7 +317,7 @@
@property
def meta(self):
"""Meta values (those not in GPT object fields)."""
- metas = set(self.__slots__) - set([f.name for f in self.FIELDS])
+ metas = set(self.__slots__) - {f.name for f in self.FIELDS}
return {name: getattr(self, name) for name in metas}
def Unpack(self, source):