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 的特殊命名约定检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 PyCharm 中禁用 PEP 8 的特殊命名约定检查
基础教程推荐
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 包装空间模型 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
