Starting with the Pike series, OpenStack no longer supports log
translation.
Update hacking rule to prevent log translation in all log level instead
of only debug level.
Change-Id: I4c6d720b2aa91a883bbf974d390028218357e1e4
* add hacking check: no_mutable_default_args()
* remove the mutable default arguments "[]" or "{}" when the function
is defined.
ref: http://docs.python-guide.org/en/latest/writing/gotchas/
Closes-Bug: #1530282
Change-Id: Ice6f7654211b73d7f8bc3ca0e4dfae3dca354397
Sahara should use jsonutils from oslo_serialization because
it support all functions from json. Also added
hacking check for that.
Change-Id: I8c286ad947b92d6552b17cfa7ef80ba1beb5b51b
Closes-bug: 1442120
As soon as we have logging guideliness now it's better for us
to have an automated hacking checks at least for some points of it.
Change-Id: I1cef618a83a23f23304b4a40eb8d4263d8b89c70
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
Import order checks was removed from upstream after discussion [1].
We want to save it in Sahara and we can do it because we support only
py2.7
NOTE: After moving to 3.x this checks should be removed/modified
[1]: http://lists.openstack.org/pipermail/openstack-dev/2014-December/052519.html
Change-Id: Ie26613c527c46bfd71ef58cb77219644d784f4c3
Closes-Bug: 1429089