Rag*_*ghu 6 python pylint bitbucket bitbucket-pipelines pylintrc
我正在使用 BitBucket 管道通过 pylint 执行 linting 检查。几个小时前还运行良好。尽管最终分数远远超过了最低标准(8.0),但我一直面临以下错误:
您的代码的评分为 9.43/10
Traceback (most recent call last):
File "/usr/local/bin/pylint-fail-under", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/pylint_fail_under/__main__.py", line 42, in main
score = results.linter.stats["global_note"]
TypeError: 'LinterStats' object is not subscriptable
Run Code Online (Sandbox Code Playgroud)
不要使用pylint-fail-under
, pylint 有一个失败选项2.5.0
,因为 pylint 和 的pylint-fail-under
维护者不会为更新的 pylint 更新他们的包。
更改pylint-fail-under --fail_under 8.0
为pylint --fail-under=8.0
并删除对 的依赖关系pylint-fail-under
。
另请参阅https://github.com/PyCQA/pylint/issues/5405和: https: //github.com/TNThieding/pylint-fail-under/issues/8#issuecomment-626369567