Rectangle 27 0

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.

python - Issue setting max line length for PEP8 in Eclipse - Stack Ove...

python eclipse pydev pep8
Rectangle 27 0

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
--max-line-length=99

Argument is managed since PyDev 3.6.0 (I successfully tested it with version 3.9.0): github.com/fabioz/Pydev/commit/

To save other people pain, I discovered that you need to restart Eclipse for changes to the arguments setting to take effect.

python - Issue setting max line length for PEP8 in Eclipse - Stack Ove...

python eclipse pydev pep8
Rectangle 27 0

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.

Thanks for your answer! I can't see the log file as I don't have the option "Aptana" in Help menu :S It's a pitty that this feature isn't available.

Ok, I forgott that you were using Eclipse and not Aptana. The logfile should then be located in <workspace>/.metadata/.log

+1 Took me some time to realize that too. This answer could have saved me a lot of that time.

@pwagner & Henke I've just included another answer that actually does solve the problem. Cheers!

The current pydev version has a pep8.py that has the --max-line-length parameter!

python - Issue setting max line length for PEP8 in Eclipse - Stack Ove...

python eclipse pydev pep8
Rectangle 27 0

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

Do code analysis?

@Caumons I am sorry but I am not able to find location of pep8.py on my eclipse kepler with PyDev. Can you please help?

@A-B-B at the time I wrote this answer this was the way to go, 3 years and a half later, things may have changed... Actually, there are other newer answers that already show how to do it in later versions.

python - Issue setting max line length for PEP8 in Eclipse - Stack Ove...

python eclipse pydev pep8