Can I configure the command line arguments that PyCharm sends to pep8.py when it does its automatic PEP8 style checking? I would like to do something like
$ pep8 --ignore=E231 foo.py
However, in PyCharm under Project Settings -> Inspections I only see options to enable/disable PEP8 style checks in aggregate, but no option to enable/disable specific PEP8 violations.
So, as you can see, PyCharm supports PEP8 as the official Python style guide.
Passing Command-line arguments in PyCharm If you want to pass command-line arguments to a python program, go to “Run > Edit Configurations” and set the Parameters value and save it.
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.
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.c.execute("""SELECT title,COUNT(path)FROM log inner join articles -- # noqa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With