Reputation: 9585
I am using Eclipse Juno
on an Ubuntu x64
machine.
I would like to change the default max line length for the PyDev
's PEP8, but I can't!
I go to Window/Preferences/PyDev/Editor/Code Analysis/pep8.py and set the following arguments:
--max-line-length=100
What I am doing wrong? After setting this, I have done a code analysis but then the line length seems to be ignored and I don't want this.
Upvotes: 11
Views: 13430
Reputation: 56660
It sounds like PyDev's support for PEP8 has improved since this question was asked. I got it to work by going to Window: Preferences: PyDev: Editor: Code Analysis, and then clicking on the pep8.py tab.
I entered the argument --max-line-length=100
, but it was ignored as you describe. However, when I enabled the "Use system interpreter" checkbox, the arguments were used. I also found that the --ignore
setting works.
I am using PyDev 4.2.0 with Eclipse 4.4.2 (Luna).
Upvotes: 0
Reputation: 823
The current Pydev has a pep8.py that can set the --max-line-length
parameter. You can just go to
Window → Preferences → Pydev → Editor → Code Analysis → pep8.py
and set Arguments to:
--max-line-length=99
Upvotes: 16
Reputation: 9585
To set the maximum line length, go to:
Window/Preferences/PyDev/Editor/Code Analysis/pep8.py
Then, open the file at Location of pep8.py
, search for MAX_LINE_LENGTH
variable and set it to the length you want. You just have to restart Eclipse and that's it! :D
Note: make sure PyDev's options Do code analysis?
is checked.
Upvotes: 11
Reputation: 125
The problem is that the maximum line length is not implemented in the pep8.py used by pydev. This means that it will not recognize the maximum line length.
If you use '- max-line-length "as you can see in the logs that it is subject to one exception and that is when it is about to parse arguments. If you open the file that the error comes from, one can see that "- max-line-length" is missing.
The log can be obtained through Help-> Aptana-> View Log File. Check for error in "pep8.py"
To make this work you probably have to ask that they fix this upstream or fix it yourself locally.
Upvotes: 4