#!/usr/bin/python3 import os from pocketlint import PocketLintConfig, PocketLinter class PypartedLintConfig(PocketLintConfig): @property def extraArgs(self): return ["--extension-pkg-whitelist", "_ped"] @property def pylintPlugins(self): retval = super(PypartedLintConfig, self).pylintPlugins retval.remove("pocketlint.checkers.eintr") return retval if __name__ == "__main__": conf = PypartedLintConfig() linter = PocketLinter(conf) rc = linter.run() os._exit(rc)
import pylint class PykickstartLintConfig(PocketLintConfig): def __init__(self): PocketLintConfig.__init__(self) self.falsePositives = [ FalsePositive( r"^W1113.*: Keyword argument before variable positional arguments list in the definition of __init__ function$" ), FalsePositive(r"W0707.*raise-missing-from"), FalsePositive(r"W1406.*redundant-u-string-prefix"), FalsePositive(r"W1514.*unspecified-encoding"), ] @property def ignoreNames(self): return {"translation-canary", ".tox"} if __name__ == "__main__": print("INFO: Using pylint v%s" % pylint.__version__) conf = PykickstartLintConfig() linter = PocketLinter(conf) rc = linter.run() if rc in [0, 4]: sys.exit(0) else: sys.exit(rc)