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 的特殊命名约定检查
基础教程推荐
- Discord.py 缺少必需的参数 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
