From f996138a0d0c1ea16a1c3e90e63eedcf8fa53148 Mon Sep 17 00:00:00 2001 From: shizhihui Date: Thu, 21 Jul 2016 12:14:45 +0800 Subject: Standardize import format According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c --- doc/source/developing.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'doc') diff --git a/doc/source/developing.rst b/doc/source/developing.rst index 95a04073..c5092cc0 100644 --- a/doc/source/developing.rst +++ b/doc/source/developing.rst @@ -173,3 +173,37 @@ or .. code-block:: bash $ pip install -e . + +Standardize Import Format +========================= + +.. _`Import Order Guide`: http://docs.openstack.org/developer/hacking/#imports + +The import order shows below: + +* {{stdlib imports in human alphabetical order}} +* \n +* {{third-party lib imports in human alphabetical order}} +* \n +* {{project imports in human alphabetical order}} +* \n +* \n +* {{begin your code}} + +Example +~~~~~~~ + +.. code-block:: python + + import copy + import fixtures + import mock + import os + + from osc_lib.api import auth + from osc_lib import utils + import six + + from openstackclient import shell + from openstackclient.tests import utils + -- cgit v1.2.1