Bump hacking to 3.1.0
pycodestyle does not know about "importutils.try_import" calls, so we have to either a) put them inside a "try" block or b) add "# noqa: E402" to each import after the try_import call Change-Id: Ia545bb689cfdfb57962d74e3957dfb372fd3782b
This commit is contained in:
@@ -35,7 +35,10 @@ from keystoneauth1.identity import base
|
|||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
from oslo_utils import strutils
|
from oslo_utils import strutils
|
||||||
osprofiler_web = importutils.try_import("osprofiler.web") # noqa
|
try:
|
||||||
|
osprofiler_web = importutils.try_import("osprofiler.web")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
import requests
|
import requests
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
@@ -33,7 +33,10 @@ from keystoneauth1 import loading
|
|||||||
from keystoneauth1 import session
|
from keystoneauth1 import session
|
||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
osprofiler_profiler = importutils.try_import("osprofiler.profiler") # noqa
|
try:
|
||||||
|
osprofiler_profiler = importutils.try_import("osprofiler.profiler")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
import requests
|
import requests
|
||||||
import six
|
import six
|
||||||
import six.moves.urllib.parse as urlparse
|
import six.moves.urllib.parse as urlparse
|
||||||
|
@@ -177,5 +177,5 @@ class TestLimitsManager(utils.TestCase):
|
|||||||
api.client.get.assert_called_once_with('/limits%s' % query_str)
|
api.client.get.assert_called_once_with('/limits%s' % query_str)
|
||||||
|
|
||||||
self.assertIsInstance(lim, limits.Limits)
|
self.assertIsInstance(lim, limits.Limits)
|
||||||
for l in lim.absolute:
|
for limit in lim.absolute:
|
||||||
self.assertEqual(l1, l)
|
self.assertEqual(l1, limit)
|
||||||
|
@@ -199,7 +199,7 @@ def unicode_key_value_to_string(src):
|
|||||||
_encode(unicode_key_value_to_string(v)))
|
_encode(unicode_key_value_to_string(v)))
|
||||||
for k, v in src.items())
|
for k, v in src.items())
|
||||||
if isinstance(src, list):
|
if isinstance(src, list):
|
||||||
return [unicode_key_value_to_string(l) for l in src]
|
return [unicode_key_value_to_string(item) for item in src]
|
||||||
return _encode(src)
|
return _encode(src)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
# Hacking already pins down pep8, pyflakes and flake8
|
# Hacking already pins down pep8, pyflakes and flake8
|
||||||
|
|
||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
hacking>=3.1.0,<3.2.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
ddt>=1.0.1 # MIT
|
ddt>=1.0.1 # MIT
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
|
Reference in New Issue
Block a user