summaryrefslogtreecommitdiff
path: root/doc/source/developing.rst
diff options
context:
space:
mode:
authorshizhihui <zhihui.shi@easystack.cn>2016-07-21 12:14:45 +0800
committershizhihui <zhihui.shi@easystack.cn>2016-07-22 19:24:02 +0800
commitf996138a0d0c1ea16a1c3e90e63eedcf8fa53148 (patch)
tree3a8e55f672b390236ad530d79ce6728a3209c67f /doc/source/developing.rst
parentd20d97fd0980f77bc4cb498d802ce690ae1cc3bf (diff)
downloadpython-openstackclient-f996138a0d0c1ea16a1c3e90e63eedcf8fa53148.tar.gz
Standardize import format
According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
Diffstat (limited to 'doc/source/developing.rst')
-rw-r--r--doc/source/developing.rst34
1 files changed, 34 insertions, 0 deletions
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
+