[openstack-dev] [hacking] [style] multi-line imports PEP 0328

Kevin L. Mitchell kevin.mitchell at rackspace.com
Tue Aug 25 15:45:59 UTC 2015


On Mon, 2015-08-24 at 22:53 -0700, Clay Gerrard wrote:
> So, I know that hacking has H301 (one import per line) - but say maybe
> you wanted to import *more* that one thing on a line (there's some
> exceptions right?  sqlalchemy migrations or something?)

There's never a need to import more than one thing per line given the
rule to only import modules, not objects.  While that is not currently
enforced by hacking, it is a strong style guideline.  (Exceptions for
things like sqlalchemy do exist, of course.)

-- 
Kevin L. Mitchell <kevin.mitchell at rackspace.com>
Rackspace




More information about the OpenStack-dev mailing list