我在python repo上设置了预提交。我有一个.pro-commit-config.yaml文件,在其中我指定了Pyint设置/参数。以前我的挂绳有效。
Pylint配置在.pro-commit-config.yaml:中
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args:
[
"-rn",
"--rcfile=./polestar.rc",
"--fail-under=6"
]
此配置以前有效。现在我得到以下错误。
pylint: error: no such option: --fail-under
我想不出有什么变化会导致这个问题。
任何建议都是很好的,或者关于如何解决它的建议。
发现问题:我所在的python环境安装了旧版本的pylint。我将pylint版本更新为最新版本,设置--fail under的选项再次可用。