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

Clay Gerrard clay.gerrard at gmail.com
Tue Aug 25 05:53:03 UTC 2015


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?)

Anyway - I'm sure there could be a pep8 plugin rule that enforces use of
parenthesis for multi line imports instead backslash line breaks [1] - but
would that be something that hacking would want to carry (since *most* of
the time H301 would kick in first?) - or if not; is there a way to plug it
into pep8 outside of hacking without having to install some random one-off
extension for this one rule separately?

-Clay

1. https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150824/c0e940d9/attachment.html>


More information about the OpenStack-dev mailing list