Configure pep8.py command line options in pycharm

If you want to force pep8 to ignore long line detection type:

  • # noqa at the end of each python code long line.
  • -- # noqa at the end of each sql code long line.

Example:

c.execute("""SELECT title,COUNT(path)FROM log inner join articles   -- # noqa

Found the solution here: http://iambigblind.blogspot.de/2013/02/configuring-pep8py-support-in-pycharm-27.html

Just add E501 to the list of ignore errors and the warning will go away in PyCharm 3 (and 4).

Edit:

According to a comment on the JetBrains site, someone said "The error code as of Pycharm 2017.3.4 is E111", see https://intellij-support.jetbrains.com/hc/en-us/community/posts/205816889-Disable-individual-PEP8-style-checking-line-length-?page=1#community_comment_360000113310


You can use a pep8 rc-file for this:

# in ~/.config/pep8
[pep8]
ignore = E231

If you need to set them up with different options per-project, this is possible too:

Configuration: The project options are read from the [pep8] section of the tox.ini file or the setup.cfg file located in any parent folder of the path(s) being processed. Allowed options are: exclude, filename, select, ignore, max-line-length, count, format, quiet, show-pep8, show-source, statistics, verbose.