Sublime Forum

Get rid of python 'line too long error'

#1

Hi All,

I work on several python scripts and I do not like the fact that using the plake8 (I suppose this is the origin) imposes the line length so that in the gutter (after saving a file) I get indicators of warnings that the line is too long. I do only want useful warnings/errors mentioned in the gutter so that I will look at them. Now I do not do that since it is most of the time ‘line too long’. So how can I avoid this error. I have already put E501 in different settings as to be ignored but in vain.

Kind regards
Alain

0 Likes

#2

You need to find out which plugin is providing these. If it’s SublimeLinter, you can easily disable these warnings in the settings.

0 Likes

#3

When I check on SublimeLinter User Preference file, I find the following:

        },
        "Python": {
            "cmd": "pyflakes"
        },

so I think it is pyflakes but I do not know how to ignore the line-too-long error.

Tx/ALain

0 Likes

#4

You are almost certainly running into PEP-8 E501. That’s the Python standard library’s style guideline and as noted, it’ll flag anything over 79 characters as being a style error. I believe both pylint and pyflakes have a configuration file that lets you turn off various style checks however you’ll have to check the documentation for those tools, and apply to your own project situation to implement.

EDIT: I found this specifically which also mentions Sublime. I have not used this advice, but seems like it’s at least a start in the right direction. https://stackoverflow.com/questions/30698377/how-to-let-pyflakes-ignore-some-errors

0 Likes