2013-10-16 15:52:49 +05:30
|
|
|
glance Style Commandments
|
2016-04-13 18:10:34 +05:30
|
|
|
=========================
|
2012-01-24 21:50:55 -05:00
|
|
|
|
2013-10-16 15:52:49 +05:30
|
|
|
- Step 1: Read the OpenStack Style Commandments
|
|
|
|
http://docs.openstack.org/developer/hacking/
|
|
|
|
- Step 2: Read on
|
2012-01-24 21:50:55 -05:00
|
|
|
|
2013-10-16 15:52:49 +05:30
|
|
|
glance Specific Commandments
|
2016-04-13 18:10:34 +05:30
|
|
|
----------------------------
|
2012-01-24 21:50:55 -05:00
|
|
|
|
2014-03-31 04:58:13 +00:00
|
|
|
- [G316] Change assertTrue(isinstance(A, B)) by optimal assert like
|
|
|
|
assertIsInstance(A, B)
|
|
|
|
- [G317] Change assertEqual(type(A), B) by optimal assert like
|
|
|
|
assertIsInstance(A, B)
|
2017-11-16 14:55:19 +07:00
|
|
|
- [G318] Change assertEqual(A, None) or assertEqual(None, A) by optimal assert
|
|
|
|
like assertIsNone(A)
|
2014-05-09 12:33:21 +02:00
|
|
|
- [G319] Validate that debug level logs are not translated
|
2014-09-17 16:38:27 +00:00
|
|
|
- [G320] For python 3 compatibility, use six.text_type() instead of unicode()
|
2014-12-24 22:16:49 +08:00
|
|
|
- [G327] Prevent use of deprecated contextlib.nested
|
2017-11-16 14:55:19 +07:00
|
|
|
- [G328] Must use a dict comprehension instead of a dict constructor with
|
|
|
|
a sequence of key-value pairs
|
2016-01-22 19:28:22 +08:00
|
|
|
- [G329] Python 3: Do not use xrange.
|
2016-01-19 03:11:50 -08:00
|
|
|
- [G330] Python 3: do not use dict.iteritems.
|
|
|
|
- [G331] Python 3: do not use dict.iterkeys.
|
|
|
|
- [G332] Python 3: do not use dict.itervalues.
|