Merge "Bump hacking"

This commit is contained in:
Zuul 2024-09-24 09:57:54 +00:00 committed by Gerrit Code Review
commit 6253bb59ce
5 changed files with 7 additions and 9 deletions

View File

@ -98,8 +98,8 @@ def _getInputFromUser(param):
message.write(param.PROMPT)
val_list = param.VALIDATORS or []
if(validators.validate_regexp not in val_list
and param.OPTION_LIST):
if (validators.validate_regexp not in val_list
and param.OPTION_LIST):
message.write(" [%s]" % "|".join(param.OPTION_LIST))
if param.DEFAULT_VALUE:

View File

@ -119,7 +119,7 @@ def is_ipv4(host):
def force_ip(host, allow_localhost=False):
if not(is_ipv6(host) or is_ipv4(host)):
if not (is_ipv6(host) or is_ipv4(host)):
host = host2ip(host, allow_localhost=allow_localhost)
return host

View File

@ -3,5 +3,4 @@ openstackdocstheme>=1.17.0 # Apache-2.0
reno>=0.1.1 # Apache2
stestr>=1.0.0 # Apache-2.0
coverage
hacking>=3.1.0,<3.2.0 # Apache-2.0
mock>=2.0 # BSD
hacking>=7.0.0,<7.1.0 # Apache-2.0

View File

@ -19,8 +19,7 @@
Test cases for packstack.installer.core.arch module.
"""
import mock
from unittest import mock
from unittest import TestCase
from packstack.installer.core import arch

View File

@ -48,8 +48,8 @@ class StepTestCase(PackstackTestCaseMixin, TestCase):
contents = sys.stdout.getvalue()
state = '[ %s ]\n' % utils.color_text('DONE', 'green')
if(not contents.startswith('Running test') or
not contents.endswith(state)):
if (not contents.startswith('Running test') or
not contents.endswith(state)):
raise AssertionError('Step run test failed: %s' % contents)