Pae*_*els 7 python code-complexity landscape.io
Landscape.io提供了很好的Python代码测试,基于PEP8,PyLint,McCabe等.
我的一些解析器方法包含大的开关块,所以我想禁用所选方法的McCabe测试MC0001.我怎样才能做到这一点?
我为PyLint找到了这个语法:
for file in get_files(): # pylint:disable=redefined-builtin
Run Code Online (Sandbox Code Playgroud)
资料来源:https://docs.landscape.io/suppressing.html
...但没有显示语法mccabe.根据我的Google研究,可以为项目中的所有文件禁用McCabe规则,但这不是我的目标.这是一个全局禁用MC0001的yaml文件:
mccabe:
disable:
- MC0001
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
707 次 |
| 最近记录: |