Re: [OpenStack-Infra] Ignoring pep8 E741

2017-10-24 Thread Jesse Keating
This is a reasonable proposal. I agree.


- jlk

On Tue, Oct 24, 2017 at 4:00 PM, James E. Blair  wrote:

> Hi,
>
> I discussed this briefly with some folks in IRC and received support,
> but I thought it wise to bring to the mailing list.
>
> I think we should add E741 to the list of pep8 errors that we ignore as
> a matter of course in infra projects.
>
> This is a recently added change which forbids the use of variables
> named either "l", "I", or "O".
>
> The same upgrade also brought E722, which rejects bare "except:"
> clauses.  There is a good reason to do so -- the KeyboardInterrupt
> exception does not inherit from the "Exception" class, and you almost
> always don't want to catch it.  So all such instances should be replaced
> with "except Exception:".  I think we should simply fix these errors.
>
> -Jim
>
> ___
> OpenStack-Infra mailing list
> OpenStack-Infra@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra
___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra

Re: [OpenStack-Infra] Ignoring pep8 E741

2017-10-24 Thread Jeremy Stanley
On 2017-10-24 16:00:25 -0700 (-0700), James E. Blair wrote:
[...]
> I think we should add E741 to the list of pep8 errors that we ignore as
> a matter of course in infra projects.
> 
> This is a recently added change which forbids the use of variables
> named either "l", "I", or "O".

Yes, straight from the I-know-what-you-were-probably-thinking-but-
you're-doing-it-wrong department. I have no interest in protecting
incompetent developers from their poor choice of fonts. This has
been a solved problem for decades, perhaps centuries.

> The same upgrade also brought E722, which rejects bare "except:"
> clauses.  There is a good reason to do so -- the KeyboardInterrupt
> exception does not inherit from the "Exception" class, and you almost
> always don't want to catch it.  So all such instances should be replaced
> with "except Exception:".  I think we should simply fix these errors.

Sounds good, I concur.
-- 
Jeremy Stanley


signature.asc
Description: Digital signature
___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra

[OpenStack-Infra] Ignoring pep8 E741

2017-10-24 Thread James E. Blair
Hi,

I discussed this briefly with some folks in IRC and received support,
but I thought it wise to bring to the mailing list.

I think we should add E741 to the list of pep8 errors that we ignore as
a matter of course in infra projects.

This is a recently added change which forbids the use of variables
named either "l", "I", or "O".

The same upgrade also brought E722, which rejects bare "except:"
clauses.  There is a good reason to do so -- the KeyboardInterrupt
exception does not inherit from the "Exception" class, and you almost
always don't want to catch it.  So all such instances should be replaced
with "except Exception:".  I think we should simply fix these errors.

-Jim

___
OpenStack-Infra mailing list
OpenStack-Infra@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra