Fix hacking check for service client
Tempest hacking check _common_service_clients_check()
still has the ignored_list_T110.txt file check but this
file was already deleted a long back
- https://review.opendev.org/c/openstack/tempest/+/568489
This fix the pep8 check for service client checks otherwise it
fail on finding the ignored_list_T110.txt file.
Change-Id: I6069d1c2f6368e768640ce69981241792ea81aac
diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py
index 6a97a00..c1e6b2d 100644
--- a/tempest/hacking/checks.py
+++ b/tempest/hacking/checks.py
@@ -140,20 +140,10 @@
"decorators.skip_because from tempest.lib")
-def _common_service_clients_check(logical_line, physical_line, filename,
- ignored_list_file=None):
+def _common_service_clients_check(logical_line, physical_line, filename):
if not re.match('tempest/(lib/)?services/.*', filename):
return False
- if ignored_list_file is not None:
- ignored_list = []
- with open('tempest/hacking/' + ignored_list_file) as f:
- for line in f:
- ignored_list.append(line.strip())
-
- if filename in ignored_list:
- return False
-
if not METHOD.match(physical_line):
return False
@@ -171,7 +161,7 @@
T110
"""
if not _common_service_clients_check(logical_line, physical_line,
- filename, 'ignored_list_T110.txt'):
+ filename):
return
for line in lines[line_number:]:
@@ -199,7 +189,7 @@
T111
"""
if not _common_service_clients_check(logical_line, physical_line,
- filename, 'ignored_list_T111.txt'):
+ filename):
return
for line in lines[line_number:]: