Search code examples
pythoneclipsepydevpep8

Issue setting max line length for PEP8 in Eclipse


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.


Solution

  • 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.