gpt4 book ai didi

python - 强制 pylint 分数 merge 到 github 分支上

转载 作者:行者123 更新时间:2023-12-02 04:22:29 27 4
gpt4 key购买 nike

我想设置一个质量检查,在授权某个 github 分支上的 merge 之前强制执行 pylint 的特定分数。有没有办法做到这一点 ?我在 github 上看到,您可以设置“merge 之前需要通过状态检查”,我猜一个状态检查可能是 pylint 上的某个分数。

感谢您的指导。

最佳答案

现在有一个解决方案:使用新的 --fail-under 标志。

"If the final score is more than the specified score, it's considered a success and pylint exits with exit code 0. Otherwise, it's considered a failure and pylint exits with its current exit code based on the messages issued."

https://github.com/PyCQA/pylint/commit/16017690196e77fcabdedf1cd8b8cbfb357a97d4

关于python - 强制 pylint 分数 merge 到 github 分支上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57988288/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com