Re: Style Guide

Héctor Velarde <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
sorry for bringing this back, but... no, is not perfectly good to add "# 
noqa" for exceptions all over the place to avoid issues with line lengths.

using "# noqa" disables ALL Flake8 warnings, including those of unused 
imports and variables; so, for instance if I have some line like this:

for my.very.long.module.namespace import a_very_long_object_name  # noqa

and later I decide not to use a_very_long_object_name in my module, but 
forget to remove it from imports, Flake8 wouldn't care about it.

"# noqa" is harmful and must be used very carefully.

you decide what do you want to have: a bunch of tested code lines longer 
than 80 characters, or a bunch of untested code lines longer than 80 
characters.

best regards

Héctor Velarde

On 25/04/2015 02:43, Timo Stollenwerk wrote:
> Yes. I have objections. We had a long discussion some time ago and
> reached an agreement. Please look up the discussion. I don't want to
> repeat everything that has been written back then. Please let's stop
> this here and not waste time again and again on such details...
>
> And yes, I watched the talk. And yes, bad things happen if you obey the
> 80 characters limit and turn off your brain at the same time. The 80
> characters limit is a hint for programmers that there MIGHT be a problem
> with your code. If you are smart, you solve it in the right way and make
> your code more readable. If you are not smart, you do the things
> Hettinger describes in his talk.
>
> It is perfecly ok to use "# noqa" for exceptions and ignore the rule if
> that makes sense. It is not ok to have two, three, or four different
> "standards" (80, 90, 100, 120, ...) within the Python community.
>
> Timo

------------------------------------------------------------------------------

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
smime.p7s (application/pkcs7-signature, 3.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.