Configuration:
The project options are read from the [pep8] section of the tox.ini
file or the setup.cfg file located in any parent folder of the path(s)
being processed. Allowed options are: exclude, filename, select,
ignore, max-line-length, count, format, quiet, show-pep8, show-source,
statistics, verbose.
您可以使用pep8 rc文件执行以下操作:
如果需要为每个项目设置不同的选项,也可以:
如果要强制pep8忽略长线检测 类型:
1)每个python代码长行末尾的noqa。 2) --#noqa位于每个sql代码长行的末尾。
示例:
c.execute(“”从日志内部连接项目中选择标题、计数(路径)--noqa
在这里找到了解决方案:http://iambigblind.blogspot.de/2013/02/configuring-pep8py-support-in-pycharm-27.html
只需将E501添加到忽略错误列表中,警告就会在PyCharm 3(和4)中消失。
编辑:
根据JetBrains网站的评论,有人说“截至Pycharm 2017.3.4的错误代码是E111”,参见https://intellij-support.jetbrains.com/hc/en-us/community/posts/205816889-Disable-individual-PEP8-style-checking-line-length-?page=1#community_comment_360000113310
相关问题 更多 >
编程相关推荐