From 71249aeb0ac08111f690cbc0f84eef508483c66d Mon Sep 17 00:00:00 2001 From: James Polley Date: Wed, 4 Jun 2014 17:15:06 +1000 Subject: [PATCH] Clarify where the "following template" is Reading through these docs, I was confused by the instruction to use the "following template" which wasn't followed by a template. Reading some more I realised that the template is a little further down the page. I've made this more explicit by adding a link to the template and changing the wording slightly. Change-Id: I9f5086ae8102e42a7929e1467be834b20b64440a --- HACKING.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index 47a1490..823aa7a 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -32,7 +32,8 @@ Imports - [H303] Do not use wildcard ``*`` import (*) - [H304] Do not make relative imports - Order your imports by the full module path -- [H305 H306 H307] Organize your imports according to the following template +- [H305 H306 H307] Organize your imports according to the `Import order + template`_ and `Real-world Import Order Examples`_ below. (*) exceptions are: @@ -40,7 +41,10 @@ Imports - imports from ``sqlalchemy`` package - imports from ``oslo-incubator.openstack.common.gettextutils`` module -Example:: +Import order template +^^^^^^^^^^^^^^^^^^^^^ + +:: {{stdlib imports in human alphabetical order}} \n @@ -51,9 +55,8 @@ Example:: \n {{begin your code}} - -Human Alphabetical Order Examples ---------------------------------- +Real-world Import Order Examples +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Example:: import httplib