A few weeks ago Robert Collins raised the issue of revising our coding
standards regarding imports. For a while we've had the standard that lists
should be formatted one-item-per line such as;
animals = [
cows,
ducks,
pigs,
]
(Note the required trailing comma on the last item.)
We had an exception for imports and allowed them to have multiple on a line.
After discussion and voting we decided to have imports be one-per-line, too.
from lp.registry.animals import (
cows,
ducks,
pigs,
)
If you only import one symbol, keeping it on the same line is preferred:
from lp.registry.cars import citroen
Henning Eggers will be writing a tool to reformat imports and will do it all at
once. Until then reviewers will not be enforcing the policy.
--Brad
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-dev
More help : https://help.launchpad.net/ListHelp