tox: fix pep8 checks

bump hacking
ignore E231,E702 checking
fix other errors

Change-Id: Ifca7d572c6e70978529084e6dffa59e98592350b
This commit is contained in:
wu.chunyang 2024-12-10 20:26:12 +08:00
parent f557061d23
commit 5a4868803b
4 changed files with 7 additions and 12 deletions

View File

@ -12,7 +12,7 @@ requests>=2.14.2 # Apache-2.0
six>=1.10.0 # MIT
tempest>=17.1.0 # Apache-2.0
tenacity>=5.1.1 # Apache-2.0
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
SQLAlchemy>=1.4.0 # MIT
PyMySQL>=0.7.6 # MIT License
psycopg2-binary>=2.6.2 # LGPL/ZPL
python-swiftclient>=3.2.0 # Apache-2.0

View File

@ -1,9 +1,4 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=3.0,<3.1.0 # Apache-2.0
hacking>=7.0.0,<7.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0

View File

@ -57,6 +57,6 @@ commands = oslo_debug_helper {posargs}
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
ignore = E123,E125,E231,E702
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build

View File

@ -280,7 +280,7 @@ class BaseTroveTest(test.BaseTestCase):
@classmethod
def delete_swift_account(cls):
LOG.info(f"Cleaning up Swift account")
LOG.info("Cleaning up Swift account")
try:
cls.account_client.delete('')
except exceptions.NotFound:
@ -481,10 +481,10 @@ class BaseTroveTest(test.BaseTestCase):
message=message)
raise exceptions.UnexpectedResponseCode(message)
if type(expected_status) != list:
if not isinstance(expected_status, list):
expected_status = [expected_status]
if type(expected_op_status) != list:
if not isinstance(expected_op_status, list):
expected_op_status = [expected_op_status]
if need_delete:
@ -602,7 +602,7 @@ class BaseTroveTest(test.BaseTestCase):
message=message)
raise exceptions.UnexpectedResponseCode(message)
if type(expected_status) != list:
if not isinstance(expected_status, list):
expected_status = [expected_status]
if need_delete: