Commit Graph

9 Commits

Author SHA1 Message Date
zhurong 070a4723be Remove six murano/hacking
Change-Id: I5b33362ccd7065c5c2890d1f1a2cb1082a29a8c2
2020-04-17 19:41:02 -07:00
Andreas Jaeger d1dae85ac7 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: Ibe28b6b6bf3927e80816f0c5f1cb972fb6e2374b
2020-03-30 11:59:26 +02:00
M V P Nitesh 580677eedc Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I45fa65427318e1c35bb521de46e81ea12ca7b770
2017-05-03 09:17:18 +00:00
Namrata 71249f19f6 Add hacking rule for using assertIsNone instead of assertEqual(None,***)
Change-Id: I03d3a45769a1a7a125d9bb1de94d22f9004d8d41
Partial-Bug: #1608173
2016-09-27 02:35:50 +00:00
Ravi Shekhar Jethani f963039bd7 Python3: Replace basestring by six.string_types
The builtin basestring abstract type was removed in python3,
use str instead, we need to use six.string_types to replace
the basestring for py3 compatibility.

This patch was generated by the following tool using 'basestring'
option.

https://github.com/haypo/sixer
Command:
python sixer.py -w basestring murano/

This also adds a check to murano/hacking/checks.py that should
catch this error in the future.

Blueprint murano-python-3-support

Change-Id: I26c236ce6dd2fffd6a4ca50e55ad62deb01bd9dd
2016-01-18 23:48:37 -08:00
Ravi Shekhar Jethani e633fd004a Python3: Replace dict.itervalues with six.itervalues
This also adds a check to murano/hacking/checks.py that should
catch this error in the future.

Blueprint murano-python-3-support

Change-Id: I50a8b2f98ddbc2819ae180b68468e0a51c13281b
2016-01-18 03:04:23 -08:00
Ravi Shekhar Jethani d99904e38b Python3: Replace dict.iterkeys with six.iterkeys
This also adds a check to murano/hacking/checks.py that should
catch this error in the future.

Blueprint murano-python-3-support

Change-Id: I172e257d0b8a89eff89e35a2f87bb42d769cad62
2016-01-18 10:27:23 +00:00
Ravi Shekhar Jethani 859888d62a Python3: Replace dict.iteritems with six.iteritems
This also adds a check to murano/hacking/checks.py that
should catch this error in the future.

Blueprint murano-python-3-support
Change-Id: Ib8b2b91a40577d18739f0c1bf2c37b7cf4060560
2016-01-15 03:15:23 -08:00
zhurong f3fdae5d0a Add mutable default arguments hacking check
Add mutable default arguments hacking check for murano
The patch was inspired from: I4aa8aede57d6fd31b4b30c3f7535b819e591165d

Change-Id: I9b5d7c1edb96fed6936a27b542f902fe1b579c23
Closes-Bug: #1530041
2015-12-21 17:18:20 +08:00