How to disable special naming convention inspection of PEP 8 in PyCharm(如何在 PyCharm 中禁用 PEP 8 的特殊命名约定检查)
问题描述
我安装了 PyCharm 并在 Inspections
中启用了 pep8
检查.如果我写:
def func(argOne):打印(argOne)
IDE 向我显示此警告:参数名称应为小写
没有选项可以忽略仅这样的检查.
我找不到这样的错误号来忽略 以忽略此类错误.
您还可以在设置>中管理忽略的错误.编辑器检查 >蟒蛇>PEP 8 命名约定违规 >忽略的错误
在 PyCharm 社区版 2016.3.2 中测试
要稍后删除修改,您可以使用 到仅显示修改的检查并用
在 PyCharm 社区版 2017.2.3 中测试
I installed PyCharm and enabled pep8
checks in Inspections
.
If I write:
def func(argOne):
print(argOne)
The IDE shows me this warning: Argument name should be lowercase
There is no option to ignore only such inspection.
I cant find such error number to ignore in pep8
here are all the naming inspections.
how to ignore only some of them?
I need this because the current project coding guidelines must be kept. It's too hard to change the guidelines of the whole project.
I need to disable only some naming inspections. Not all like by "Settings"-> "Editor"-> "Inspections"->"PEP8 coding style violation"
.
e.g. class names should be still inspected with PEP8, and function argument names not.
Since to Ignore errors like this.
Further more you can manage the ignored errors at Settings > Editor > Inspections > Python > PEP 8 naming convention violation > Ignored errors
Tested in PyCharm Community Edition 2016.3.2
Edit:
To remove the modification later on you can use to Show Only Modified Inspections and delete the Ignored errors with
Tested in PyCharm Community Edition 2017.2.3
这篇关于如何在 PyCharm 中禁用 PEP 8 的特殊命名约定检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!