Spyder忽略了.pycodestyle [英] Spyder ignores .pycodestyle
问题描述
我正在使用Spyder v.3.2.8,并且试图修改实时代码样式分析.例如,我想将max-line-length设置为99.
I am using Spyder v.3.2.8 and I'm trying to modify the Real-time code style analysis. For example, I'd like to set the max-line-length to 99.
I exactly followed what was suggested here, i.e. I created a file .pycodestyle
in the directory resulting from import os; os.path.expanduser('~')
. The file looks as follows
[pycodestyle]
ignore = E226,E302,E41,E501,W503
max-line-length = 99
我知道忽略E501会使max-line-length
实际上无效.但是,如果代码超过默认的79列,我仍然会收到警告.我想念什么吗?
I am aware that ignoring E501 renders max-line-length
virtually ineffective. However, I still get warnings if the code exceeds the default 79 columns. Am I missing something?
问题已解决.突然之间,设置被识别.重新启动可能有所帮助(操作系统:Windows 10).
The issue is solved now. All of a sudden, the settings are recognized. A reboot might have helped (OS: Windows 10).
推荐答案
我遇到了同样的问题,并且通过创建文件~/.config/pycodestyle
(没有点且在~/.config
内)而不是~/.pycodestyle
来解决了该问题,根据官方网站:
I had the same problem and I have resolved it by creating a file ~/.config/pycodestyle
(without a dot and inside ~/.config
) instead of ~/.pycodestyle
, according to the official website:
这篇关于Spyder忽略了.pycodestyle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!