setup.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:virt-bootstrap 作者: virt-manager 项目源码 文件源码
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+)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号