Revision 342b888d doc/dev-codestyle.rst

b/doc/dev-codestyle.rst
257 257
Imports should be grouped into the following groups and inside each group they
258 258
should be sorted alphabetically:
259 259

  
260
1. standard library imports
261
2. third-party imports
262
3. local imports
260
1. import of non-Ganeti libaries
261
2. import of Ganeti libraries
263 262

  
264 263
It is allowed to use qualified imports with short names for:
265 264

  
266 265
* standard library (e.g. ``import qualified Data.Map as M``)
267
* local imports (e.g. ``import qualified Ganeti.Constants as C``), although
268
  this form should be kept to a minimum
266
* local imports (e.g. ``import qualified Ganeti.Constants as C``)
267

  
268
Whenever possible, prefer explicit imports, either in form of
269
qualified imports, or by naming the imported functions
270
(e.g., ``import Control.Arrow ((&&&))``, ``import Data.Foldable(fold, toList)``)
269 271

  
270 272
Indentation
271 273
~~~~~~~~~~~

Also available in: Unified diff