[openstack-dev] [hacking] proposed rules drop for 1.0

Kevin L. Mitchell kevin.mitchell at rackspace.com
Tue Dec 9 16:58:01 UTC 2014

On Tue, 2014-12-09 at 10:05 -0500, Sean Dague wrote:
> Sure, the H8* group is git commit messages. It's checking for line
> length in the commit message.

I agree the H8* group should be dropped.  It would be appropriate to
create a new gate check job that validated that, but it should not be
part of hacking.

> H3* are all the module import rules:
> Imports
> -------
> - [H302] Do not import objects, only modules (*)
> - [H301] Do not import more than one module per line (*)
> - [H303] Do not use wildcard ``*`` import (*)
> - [H304] Do not make relative imports
> - Order your imports by the full module path
> - [H305 H306 H307] Organize your imports according to the `Import order
>   template`_ and `Real-world Import Order Examples`_ below.
> I think these remain reasonable guidelines, but H302 is exceptionally
> tricky to get right, and we keep not getting it right.
> H305-307 are actually impossible to get right. Things come in and out of
> stdlib in python all the time.
> I think it's time to just decide to be reasonable Humans and that these
> are guidelines.
> The H3* set of rules is also why you have to install *all* of
> requirements.txt and test-requirements.txt in your pep8 tox target,
> because H302 actually inspects the sys.modules to attempt to figure out
> if things are correct.

I agree that dropping H302 and the grouping checks makes sense.  I think
we should keep the H301, H303, H304, and the basic ordering checks,
however; it doesn't seem to me that these would be that difficult to
implement or maintain.
Kevin L. Mitchell <kevin.mitchell at rackspace.com>

More information about the OpenStack-dev mailing list