5

I know this question has already been asked but none of the solutions I have found are working for me. I want to disable the pylint warning E501, line too long while coding in pydev. I have tried in line comments # pylint: disable=E501 and even #pylint: disable=C3031.

I have made an rc file called standard.rc and put it in the options for pylint in eclipse as described here: How do I disable a Pylint warning? and even went into the rc file and changed the maximum number of characters allowed on a line. But no luck at all!

Community
  • 1
  • 1
ruby74
  • 137
  • 1
  • 4
  • 10
  • pylint doesn't have E501 nor C3031 messages, that may be the problem. Also recent release encourage readable name, eg `#pylint: disable=line-too-long` – sthenault Jul 16 '14 at 07:20
  • Thanks @sthenault. However I also tried that (and just tried again to double check) and it doesn't work. I did it like this: self.poplt_list = [i for i in self.poplt_list if self.poplt_list.col_alive == 'alive'] #pylint: disable=line-too-long and I am still getting the error. What am I doing wrong? – ruby74 Jul 16 '14 at 19:22
  • Which PyDev/PyLint versions are you using? – Fabio Zadrozny Jul 17 '14 at 00:59
  • I have PyDev 3.3.3 and pylint 0.26 – ruby74 Jul 18 '14 at 18:17

2 Answers2

11

The E501 line too long error comes from pep8, not pylint.

You can run it as pep8 --ignore=E501 to avoid that report (specially if you are already checking long lines with pylint).

Tom Pohl
  • 2,711
  • 3
  • 27
  • 34
Ángel
  • 890
  • 7
  • 12
  • But, how do I ignore more than one error? If I am in editor > code Analysis and i input the argument --ignore=E501,E261 all errors are removed, instead of just those two. – ruby74 Jan 29 '15 at 19:18
  • @ruby74, `--ignore=E501,E261` works for me. Errors of type E501 and E261 are not shown but the rest are. Maybe it's an old version of pep8? – Ángel Jan 30 '15 at 11:52
2

Have you tried just cranking up the max-line-length variable to an absurd number?

Example: pylint --max-line-length=999 ...{rest of the command}

schlpr0k
  • 21
  • 2