Bump hacking minimum version to 6.1.0
Change-Id: I1719fcef045884930f9f1d8df8b9b8cc150d0a0c
This commit is contained in:
parent
8a5319fd5d
commit
eef0d2e466
@ -114,7 +114,7 @@ def no_translate_logs(logical_line, filename):
|
|||||||
C313
|
C313
|
||||||
"""
|
"""
|
||||||
if translated_logs.match(logical_line):
|
if translated_logs.match(logical_line):
|
||||||
yield(0, "C313 Don't translate logs")
|
yield (0, "C313 Don't translate logs")
|
||||||
|
|
||||||
|
|
||||||
class CheckLoggingFormatArgs(BaseASTChecker):
|
class CheckLoggingFormatArgs(BaseASTChecker):
|
||||||
@ -204,7 +204,7 @@ def check_explicit_underscore_import(logical_line, filename):
|
|||||||
custom_underscore_check.match(logical_line)):
|
custom_underscore_check.match(logical_line)):
|
||||||
UNDERSCORE_IMPORT_FILES.append(filename)
|
UNDERSCORE_IMPORT_FILES.append(filename)
|
||||||
elif string_translation.match(logical_line):
|
elif string_translation.match(logical_line):
|
||||||
yield(0, "C321: Found use of _() without explicit import of _ !")
|
yield (0, "C321: Found use of _() without explicit import of _ !")
|
||||||
|
|
||||||
|
|
||||||
class CheckForStrUnicodeExc(BaseASTChecker):
|
class CheckForStrUnicodeExc(BaseASTChecker):
|
||||||
@ -294,7 +294,7 @@ def check_oslo_namespace_imports(logical_line, noqa):
|
|||||||
msg = ("C317: '%s' must be used instead of '%s'.") % (
|
msg = ("C317: '%s' must be used instead of '%s'.") % (
|
||||||
logical_line.replace('oslo.', 'oslo_'),
|
logical_line.replace('oslo.', 'oslo_'),
|
||||||
logical_line)
|
logical_line)
|
||||||
yield(0, msg)
|
yield (0, msg)
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
@ -317,7 +317,7 @@ def no_xrange(logical_line):
|
|||||||
C319
|
C319
|
||||||
"""
|
"""
|
||||||
if assert_no_xrange_re.match(logical_line):
|
if assert_no_xrange_re.match(logical_line):
|
||||||
yield(0, "C319: Do not use xrange().")
|
yield (0, "C319: Do not use xrange().")
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
@ -329,7 +329,7 @@ def validate_assertTrue(logical_line):
|
|||||||
if re.match(assert_True, logical_line):
|
if re.match(assert_True, logical_line):
|
||||||
msg = ("C312: Unit tests should use assertTrue(value) instead"
|
msg = ("C312: Unit tests should use assertTrue(value) instead"
|
||||||
" of using assertEqual(True, value).")
|
" of using assertEqual(True, value).")
|
||||||
yield(0, msg)
|
yield (0, msg)
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
@ -341,7 +341,7 @@ def validate_assertIsNone(logical_line):
|
|||||||
if re.match(assert_None, logical_line):
|
if re.match(assert_None, logical_line):
|
||||||
msg = ("C311: Unit tests should use assertIsNone(value) instead"
|
msg = ("C311: Unit tests should use assertIsNone(value) instead"
|
||||||
" of using assertEqual(None, value).")
|
" of using assertEqual(None, value).")
|
||||||
yield(0, msg)
|
yield (0, msg)
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
@ -352,7 +352,7 @@ def no_log_warn_check(logical_line):
|
|||||||
"""
|
"""
|
||||||
msg = ("C320: LOG.warn is deprecated, please use LOG.warning!")
|
msg = ("C320: LOG.warn is deprecated, please use LOG.warning!")
|
||||||
if re.match(no_log_warn, logical_line):
|
if re.match(no_log_warn, logical_line):
|
||||||
yield(0, msg)
|
yield (0, msg)
|
||||||
|
|
||||||
|
|
||||||
@core.flake8ext
|
@core.flake8ext
|
||||||
|
@ -404,16 +404,16 @@ class TestReprocessingSchedulerGetApi(tests.TestCase):
|
|||||||
request_mock.args.lists.return_value = []
|
request_mock.args.lists.return_value = []
|
||||||
list_all_return = self.endpoint.get()
|
list_all_return = self.endpoint.get()
|
||||||
|
|
||||||
self.assertTrue("results" in list_all_return)
|
self.assertIn("results", list_all_return)
|
||||||
self.assertTrue("id" not in list_all_return['results'][0])
|
self.assertNotIn("id", list_all_return['results'][0])
|
||||||
self.assertTrue("scope_id" in list_all_return['results'][0])
|
self.assertIn("scope_id", list_all_return['results'][0])
|
||||||
self.assertTrue("reason" in list_all_return['results'][0])
|
self.assertIn("reason", list_all_return['results'][0])
|
||||||
self.assertTrue(
|
self.assertIn(
|
||||||
"current_reprocess_time" in list_all_return['results'][0])
|
"current_reprocess_time", list_all_return['results'][0])
|
||||||
self.assertTrue(
|
self.assertIn(
|
||||||
"start_reprocess_time" in list_all_return['results'][0])
|
"start_reprocess_time", list_all_return['results'][0])
|
||||||
self.assertTrue(
|
self.assertIn(
|
||||||
"end_reprocess_time" in list_all_return['results'][0])
|
"end_reprocess_time", list_all_return['results'][0])
|
||||||
|
|
||||||
self.assertEqual("scope_identifier",
|
self.assertEqual("scope_identifier",
|
||||||
list_all_return['results'][0]['scope_id'])
|
list_all_return['results'][0]['scope_id'])
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
# hacking should be first
|
# hacking should be first
|
||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||||
|
|
||||||
coverage>=5.3 # Apache-2.0
|
coverage>=5.3 # Apache-2.0
|
||||||
kombu>=5.0.2 # BSD
|
kombu>=5.0.2 # BSD
|
||||||
|
Loading…
Reference in New Issue
Block a user