Release notes: http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html
Ignore some new rules that have more then 10 failures, fix ones that
have fewer.
Removed deleted hacking rules from tox.ini
Note: One of the main benefits of the new hacking, is flake8 enables
concurrency by default now, so it should be much faster.
Change-Id: Ie650fa3dc91434967ad05e61edd3bcc1d833bfb1
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.
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.
weight_properties = {}
weight = weigher._weigh_object(host_state, weight_properties)
- self.assertEqual(0, weight)
\ No newline at end of file
+ self.assertEqual(0, weight)
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"))))
\ No newline at end of file
+ "LOG.exception(_LE('foo')", "foo.py"))))
except Exception as exc:
LOG.warning(_LW('Cannot get volume status '
'%(exc)s.'), {'exc': exc})
- return self._stats
\ No newline at end of file
+ return self._stats
# 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
# 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