[code-quality] pylint: How to ignore max line length limit for long import statements

Florian Bruhin me at the-compiler.org
Sat Aug 11 06:29:16 EDT 2018


Hey,

On Sat, Aug 11, 2018 at 05:46:56AM +0000, Jiongjiong Li wrote:
> Is there any convenient way to ignore max line length limit for import
> statements, such as by setting rc file?
> 
> pylint always report: C0301:Line too long (108/100).
> 
> But according to [1]Google Style Guide, it's fine to not limit line length
> for long import statements.

There's a --ignore-long-lines (under [format] if in .pylintrc) option
which allows you to define a regex for that.

Something like ignore-long-lines=^import should probably help.

Florian

-- 
https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/code-quality/attachments/20180811/cdf1f83a/attachment.sig>


More information about the code-quality mailing list