Fix lint errors for pylint 1.5.6.
Chroot had pylint updated to 1.5.6 after CL:1148788, fix or suppress all
lint errors.
The redefined-variable-type (R0204) produced too many false-positive to
be useful, so it's disabled. The lint is moved to an extension and
disabled by default in later version of pylint.
BUG=chromium:863669
TEST=make lint
TEST=make test
Change-Id: I29cac1b1e2bf18933793b215d40b58aa1632df9f
Reviewed-on: https://chromium-review.googlesource.com/1206552
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/py/utils/pygpt.py b/py/utils/pygpt.py
index a1955e8..962994b 100755
--- a/py/utils/pygpt.py
+++ b/py/utils/pygpt.py
@@ -266,7 +266,7 @@
"""
__slots__ = []
- FIELDS = None
+ FIELDS = []
"""A list of StructField definitions."""
def __init__(self, *args, **kargs):
@@ -1597,7 +1597,7 @@
level=log_level)
try:
code = commands.Execute(args)
- if type(code) is int:
+ if isinstance(code, int):
sys.exit(code)
except Exception as e:
if args.verbose or args.debug: