From a6742203a6caddac64a4b2fb66575dfe8bb31b81 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 14 Apr 2021 15:51:22 -0700 Subject: [PATCH] tests: Fix pocketlint use of removed pylint messages pylint has removed python2 only messages so running pocketlint is causing tracebacks in every file. This removes the problem messages from the disabledOptions property until pocketlint can be fixed upstream. --- tests/pylint/runpylint.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/pylint/runpylint.py b/tests/pylint/runpylint.py index f9c58699..693e9df0 100755 --- a/tests/pylint/runpylint.py +++ b/tests/pylint/runpylint.py @@ -33,6 +33,18 @@ class LoraxLintConfig(PocketLintConfig): def extraArgs(self): return ["--extension-pkg-whitelist=rpm"] + @property + def disabledOptions(self): + retval = super(LoraxLintConfig, self).disabledOptions + + # Remove messages that are no longer supported in py3 + for msg in ["W0110", "W0141", "W0142", "I0012"]: + try: + retval.remove(msg) + except ValueError: + pass + return retval + if __name__ == "__main__": conf = LoraxLintConfig() linter = PocketLinter(conf)