Bump hacking minimum version to 6.1.0

Change-Id: I1719fcef045884930f9f1d8df8b9b8cc150d0a0c
This commit is contained in:
Pierre Riteau 2024-06-10 16:35:34 +02:00
parent 8a5319fd5d
commit eef0d2e466
3 changed files with 18 additions and 18 deletions

View File

@ -114,7 +114,7 @@ def no_translate_logs(logical_line, filename):
C313
"""
if translated_logs.match(logical_line):
yield(0, "C313 Don't translate logs")
yield (0, "C313 Don't translate logs")
class CheckLoggingFormatArgs(BaseASTChecker):
@ -204,7 +204,7 @@ def check_explicit_underscore_import(logical_line, filename):
custom_underscore_check.match(logical_line)):
UNDERSCORE_IMPORT_FILES.append(filename)
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):
@ -294,7 +294,7 @@ def check_oslo_namespace_imports(logical_line, noqa):
msg = ("C317: '%s' must be used instead of '%s'.") % (
logical_line.replace('oslo.', 'oslo_'),
logical_line)
yield(0, msg)
yield (0, msg)
@core.flake8ext
@ -317,7 +317,7 @@ def no_xrange(logical_line):
C319
"""
if assert_no_xrange_re.match(logical_line):
yield(0, "C319: Do not use xrange().")
yield (0, "C319: Do not use xrange().")
@core.flake8ext
@ -329,7 +329,7 @@ def validate_assertTrue(logical_line):
if re.match(assert_True, logical_line):
msg = ("C312: Unit tests should use assertTrue(value) instead"
" of using assertEqual(True, value).")
yield(0, msg)
yield (0, msg)
@core.flake8ext
@ -341,7 +341,7 @@ def validate_assertIsNone(logical_line):
if re.match(assert_None, logical_line):
msg = ("C311: Unit tests should use assertIsNone(value) instead"
" of using assertEqual(None, value).")
yield(0, msg)
yield (0, msg)
@core.flake8ext
@ -352,7 +352,7 @@ def no_log_warn_check(logical_line):
"""
msg = ("C320: LOG.warn is deprecated, please use LOG.warning!")
if re.match(no_log_warn, logical_line):
yield(0, msg)
yield (0, msg)
@core.flake8ext

View File

@ -404,16 +404,16 @@ class TestReprocessingSchedulerGetApi(tests.TestCase):
request_mock.args.lists.return_value = []
list_all_return = self.endpoint.get()
self.assertTrue("results" in list_all_return)
self.assertTrue("id" not in list_all_return['results'][0])
self.assertTrue("scope_id" in list_all_return['results'][0])
self.assertTrue("reason" in list_all_return['results'][0])
self.assertTrue(
"current_reprocess_time" in list_all_return['results'][0])
self.assertTrue(
"start_reprocess_time" in list_all_return['results'][0])
self.assertTrue(
"end_reprocess_time" in list_all_return['results'][0])
self.assertIn("results", list_all_return)
self.assertNotIn("id", list_all_return['results'][0])
self.assertIn("scope_id", list_all_return['results'][0])
self.assertIn("reason", list_all_return['results'][0])
self.assertIn(
"current_reprocess_time", list_all_return['results'][0])
self.assertIn(
"start_reprocess_time", list_all_return['results'][0])
self.assertIn(
"end_reprocess_time", list_all_return['results'][0])
self.assertEqual("scope_identifier",
list_all_return['results'][0]['scope_id'])

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
# 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
kombu>=5.0.2 # BSD