Bump hacking

hacking 3.0.x is too old.

Change-Id: I970dcf9673ef75c719714f565bd4df2eb47c0989
This commit is contained in:
Takashi Kajinami 2024-01-27 19:06:09 +09:00
parent 323a4cbf8c
commit 7e7465140f
3 changed files with 12 additions and 11 deletions

View File

@ -38,7 +38,7 @@ def no_log_warn(logical_line):
C301 C301
""" """
if logical_line.startswith('LOG.warn('): if logical_line.startswith('LOG.warn('):
yield(0, 'C301 Use LOG.warning() rather than LOG.warn()') yield (0, 'C301 Use LOG.warning() rather than LOG.warn()')
@core.flake8ext @core.flake8ext
@ -52,5 +52,5 @@ def no_os_popen(logical_line):
""" """
if 'os.popen(' in logical_line: if 'os.popen(' in logical_line:
yield(0, 'C302 Deprecated library function os.popen(). ' yield (0, 'C302 Deprecated library function os.popen(). '
'Replace it using subprocess module. ') 'Replace it using subprocess module. ')

View File

@ -1618,7 +1618,7 @@ class TestDynamicPollster(base.BaseTestCase):
request_args = pollster.definitions.sample_gatherer\ request_args = pollster.definitions.sample_gatherer\
.create_request_arguments(pollster.definitions.configurations) .create_request_arguments(pollster.definitions.configurations)
self.assertTrue("headers" in request_args) self.assertIn("headers", request_args)
self.assertEqual(2, len(request_args["headers"])) self.assertEqual(2, len(request_args["headers"]))
self.assertEqual(['header1', 'header2'], self.assertEqual(['header1', 'header2'],
@ -1629,7 +1629,7 @@ class TestDynamicPollster(base.BaseTestCase):
list(map(lambda h: list(h.values())[0], list(map(lambda h: list(h.values())[0],
request_args["headers"]))) request_args["headers"])))
self.assertTrue("authenticated" not in request_args) self.assertNotIn("authenticated", request_args)
def test_create_request_arguments_PollsterSampleGatherer(self): def test_create_request_arguments_PollsterSampleGatherer(self):
pollster_definition = copy.deepcopy( pollster_definition = copy.deepcopy(
@ -1644,8 +1644,8 @@ class TestDynamicPollster(base.BaseTestCase):
request_args = pollster.definitions.sample_gatherer\ request_args = pollster.definitions.sample_gatherer\
.create_request_arguments(pollster.definitions.configurations) .create_request_arguments(pollster.definitions.configurations)
self.assertTrue("headers" in request_args) self.assertIn("headers", request_args)
self.assertTrue("authenticated" in request_args) self.assertIn("authenticated", request_args)
self.assertTrue(request_args["authenticated"]) self.assertTrue(request_args["authenticated"])
self.assertEqual(3, len(request_args["headers"])) self.assertEqual(3, len(request_args["headers"]))
@ -1667,8 +1667,8 @@ class TestDynamicPollster(base.BaseTestCase):
pollster.definitions.sample_gatherer.create_request_arguments( pollster.definitions.sample_gatherer.create_request_arguments(
pollster.definitions.configurations) pollster.definitions.configurations)
self.assertTrue("headers" not in request_args) self.assertNotIn("headers", request_args)
self.assertTrue("authenticated" in request_args) self.assertIn("authenticated", request_args)
self.assertTrue(request_args["authenticated"]) self.assertTrue(request_args["authenticated"])
@mock.patch('keystoneclient.v2_0.client.Client') @mock.patch('keystoneclient.v2_0.client.Client')

View File

@ -33,7 +33,8 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:pep8] [testenv:pep8]
deps = hacking>=3.0.1,<=3.1.0 deps =
hacking>=6.1.0,<6.2.0
doc8 doc8
commands = commands =
flake8 flake8