def run(self):
"""
Call pycodestyle and pylint here.
"""
res = 0
files = ' '.join(["setup.py", "src/virtBootstrap/*.py", "tests/*.py"])
output_format = "colorized" if sys.stdout.isatty() else "text"
print(">>> Running pycodestyle ...")
cmd = "pycodestyle "
if (subprocess.call(cmd + files, shell=True) != 0):
res = 1
print(">>> Running pylint ...")
args = ""
if self.errors_only:
args = "-E"
cmd = "pylint %s --output-format=%s " % (args, format(output_format))
if (subprocess.call(cmd + files, shell=True) != 0):
res = 1
sys.exit(res)
# SdistCommand is reused from the libvirt python binding (GPLv2+)
评论列表
文章目录