4dc5dfdada
PEP-0274 introduced dict comprehensions to replace dict constructor with a sequence of key-pairs[1], these are twobenefits: First, it makes the code look neater. Second, it gains a micro-optimization. sahara dropped python 2.6 support in Kilo, we can leverage this now. Note: This commit doesn't handle dict constructor with kwargs. This commit also adds a hacking rule. [1]http://legacy.python.org/dev/peps/pep-0274/ Closes-Bug: #1430786 Change-Id: I507f2c520ddab1ae3d8487bf7aea497306eb6eb2
987 B
987 B
Sahara Style Commandments
- Step 1: Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
- Step 2: Read on
Sahara Specific Commandments
Commit Messages
Using a common format for commit messages will help keep our git history readable. Follow these guidelines:
- [S365] First, provide a brief summary of 50 characters or less. Summaries of greater then 72 characters will be rejected by the gate.
- [S364] The first line of the commit message should provide an accurate description of the change, not just a reference to a bug or blueprint.
Imports
- [S366, S367] Organize your imports according to the
Import order
Dictionaries/Lists
- [S368] Must use a dict comprehension instead of a dict constructor with a
-
sequence of key-value pairs. For more information, please refer to http://legacy.python.org/dev/peps/pep-0274/