Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling a pylint warning E501. Nothing is working

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!

like image 773
ruby74 Avatar asked Jul 15 '14 18:07

ruby74


People also ask

How do I ignore Pylint errors in file?

If you want to disable specific warnings only, this can be done by adding a comment such as # pylint: disable=message-name to disable the specified message for the remainder of the file, or at least until # pylint: enable=message-name .

How do you bypass Pylint?

you can ignore it by adding a comment in the format # pylint: disable=[problem-code] at the end of the line where [problem-code] is the value inside pylint(...) in the pylint message – for example, abstract-class-instantiated for the problem report listed above.


2 Answers

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

like image 176
Ángel Avatar answered Oct 12 '22 14:10

Ángel


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}

like image 26
schlpr0k Avatar answered Oct 12 '22 13:10

schlpr0k