[Openstack] [Quantum] Ordering of imports

Zhongyue Luo lzyeval at gmail.com
Thu Jun 21 13:36:27 UTC 2012


Hi, stackers

Recently I submitted a patch of re-ordered imports by full module path, as
stated in HACKING.rst
https://review.openstack.org/#/c/8666/

The full module path of a import is the absolute path of the module/object
from its package root.

Therefore, the order of the modules/objects

from quantum.plugins.cisco.db.models import BASE
from quantum.plugins.cisco.db import models

should be

from quantum.plugins.cisco.db import
models (quantum.plugins.cisco.db.models)
from quantum.plugins.cisco.db.models import
BASE (quantum.plugins.cisco.db.models.BASE)

The re-ordering was done using a tool I wrote.
https://review.openstack.org/#/c/8592/

Once the tool gets in openstack-common, it will be easier to check the
import order of your patches before submitting them for review.

Cheers,
LZY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120621/9c447d5e/attachment.html>


More information about the Openstack mailing list