Merge "Move to hacking 0.10"
This commit is contained in:
commit
a81b8d1a72
@ -136,9 +136,11 @@ class Limit(object):
|
||||
self.water_level = 0
|
||||
self.capacity = self.unit
|
||||
self.request_value = float(self.capacity) / float(self.value)
|
||||
msg = _("Only %(value)s %(verb)s request(s) can be "
|
||||
"made to %(uri)s every %(unit_string)s.")
|
||||
self.error_message = msg % self.__dict__
|
||||
msg = (_("Only %(value)s %(verb)s request(s) can be "
|
||||
"made to %(uri)s every %(unit_string)s.") %
|
||||
{'value': self.value, 'verb': self.verb,
|
||||
'uri': self.uri, 'unit_string': self.unit_string})
|
||||
self.error_message = msg
|
||||
|
||||
def __call__(self, verb, url):
|
||||
"""Represent a call to this limit from a relevant request.
|
||||
|
@ -136,9 +136,11 @@ class Limit(object):
|
||||
self.water_level = 0
|
||||
self.capacity = self.unit
|
||||
self.request_value = float(self.capacity) / float(self.value)
|
||||
msg = _("Only %(value)s %(verb)s request(s) can be "
|
||||
"made to %(uri)s every %(unit_string)s.")
|
||||
self.error_message = msg % self.__dict__
|
||||
msg = (_("Only %(value)s %(verb)s request(s) can be "
|
||||
"made to %(uri)s every %(unit_string)s.") %
|
||||
{'value': self.value, 'verb': self.verb,
|
||||
'uri': self.uri, 'unit_string': self.unit_string})
|
||||
self.error_message = msg
|
||||
|
||||
def __call__(self, verb, url):
|
||||
"""Represent a call to this limit from a relevant request.
|
||||
|
@ -182,4 +182,4 @@ class GoodnessWeigherTestCase(test.TestCase):
|
||||
|
||||
weight_properties = {}
|
||||
weight = weigher._weigh_object(host_state, weight_properties)
|
||||
self.assertEqual(0, weight)
|
||||
self.assertEqual(0, weight)
|
||||
|
@ -198,4 +198,4 @@ class HackingTestCase(test.TestCase):
|
||||
self.assertEqual(0, len(list(checks.validate_log_translations(
|
||||
"LOG.error(_LE('foo')", "foo.py"))))
|
||||
self.assertEqual(0, len(list(checks.validate_log_translations(
|
||||
"LOG.exception(_LE('foo')", "foo.py"))))
|
||||
"LOG.exception(_LE('foo')", "foo.py"))))
|
||||
|
@ -153,4 +153,4 @@ class DPLISCSIDriver(dplcommon.DPLCOMMONDriver,
|
||||
except Exception as exc:
|
||||
LOG.warning(_LW('Cannot get volume status '
|
||||
'%(exc)s.'), {'exc': exc})
|
||||
return self._stats
|
||||
return self._stats
|
||||
|
@ -3,7 +3,8 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
hacking>=0.9.2,<0.10
|
||||
hacking<0.11,>=0.10.0
|
||||
|
||||
coverage>=3.6
|
||||
discover
|
||||
fixtures>=0.3.14
|
||||
|
18
tox.ini
18
tox.ini
@ -55,22 +55,18 @@ commands = python setup.py build_sphinx
|
||||
# E251 unexpected spaces around keyword / parameter equals
|
||||
# reason: no improvement in readability
|
||||
#
|
||||
# H402 one line docstring needs punctuation
|
||||
# reason: removed in hacking (https://review.openstack.org/#/c/101497/)
|
||||
#
|
||||
# H803 git commit title should not end with period
|
||||
# reason: removed in hacking (https://review.openstack.org/#/c/101498/)
|
||||
#
|
||||
# H904 wrap long lines in parentheses instead of a backslash
|
||||
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
|
||||
#
|
||||
# Due to the upgrade to hacking 0.9.2 the following checking are
|
||||
# ignored on purpose for the moment and should be re-enabled.
|
||||
#
|
||||
# H405
|
||||
# Due to the upgrade to hacking 0.10.0 the following checking are
|
||||
# ignored on purpose for the moment and should be cleaned up and re-enabled.
|
||||
#
|
||||
# H238 old style class declaration, use new style (inherit from `object`)
|
||||
# H105 Don't use author tags
|
||||
#
|
||||
|
||||
|
||||
ignore = E251,H402,H405,H803,H904
|
||||
ignore = E251,H405,H238,H105
|
||||
exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build
|
||||
max-complexity=30
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user