Pycodestyle E701 and line length


#1

I just discovered pycodestyle, which is great!
Is there any way I can disable only one warning E701 multiple statements on one line
I rather like the construct within a loop
if value < 100: continue

Also what is a reasonable line length for Python code?
I know why the default line length is 80 characters - since I doubt anyone here really used a card punch to do programming. I did - started with Pascal on an ICL mainframe, and used card decks to input code.
Also programmed in FORTRAN so I know why sequence numbers.

ps. How do I set the default line length… I know it is in Settings somewhere…


#2

Is there any way I can disable only one warning E701 multiple statements on one line

If you’re talking about using linter-pycodestyle, you can add the error code E701 to the ignoreErrorCodes package setting. There you will also find the maxLineLength setting.

To open the package settings, open the Preferences, then click on Packages, search for pycodestyle and click on it. Personally, I find the package-settings package most convenient, since it allows opening package settings from the command palette.


#3

@idleberg Thankyou for your help here. E701 is now in the ignored list!