[openstack-dev] [hacking] proposed rules drop for 1.0
Kevin L. Mitchell
kevin.mitchell at rackspace.com
Tue Dec 9 17:20:53 UTC 2014
On Tue, 2014-12-09 at 12:05 -0500, Sean Dague wrote:
> > 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.
>
> Well, be careful what you think is easy -
> https://github.com/openstack-dev/hacking/blob/master/hacking/checks/imports.py
> :)
So, hacking_import_rules() is very complex. However, it implements H302
as well as H301, H303, and H304. I feel it can be simplified to just a
textual match rule if we remove the H302 implementation: H301 just needs
to exclude imports with ',', H303 needs to exclude imports with '*', and
H304 is already implemented as a regular expression match. It looks
like the basic ordering check I was referring to is H306, which isn't
all that complicated. It seems like the rest of the code is related to
the checks which I just agreed should be dropped :) Am I missing
anything?
--
Kevin L. Mitchell <kevin.mitchell at rackspace.com>
Rackspace
More information about the OpenStack-dev
mailing list