How to tell Spyder's style analysis PEP8 to read from a setup.cfg or increase max. line length?
According to the link cited by @Werner:
http://pep8.readthedocs.org/en/latest/intro.html#configuration
what you need to do is to create a file called ~/.config/pep8
(On Linux/Mac) or ~/.pep8
(on Windows), and add these lines to it:
[pep8]
max-line-length = 99
I tested it in Spyder and it works as expected.
Inspired by Minh's comment I've been able to make this work for spyder 3.8 by doing the following. Find out the ~ directory using
import os; os.path.expanduser('~')
(see remark ofJustin Harris)
Then add a file to the ~ directory called .pycodestyle
containing:
[pycodestyle]
max-line-length = 99
(see Carlos Cordoba's answer)
Restart spyder [EDIT: according to the comments below this is not needed]. This is actually just combining most of the above remarks and answers.
If you are user "myname" using conda, in environment "myenv" try to edit the file: /home/myname/miniconda3/envs/myenv/lib/python3.7/site-packages/pycodestyle.py and change MAX_LINE_LENGTH=79 to MAX_LINE_LENGTH=100, for example. Worked for my Spyder 3.3.6.