Fix issues related to py312 compatibility

Summary of changes:
- Bump flake8 from 3.9.2 to 7.1.1
- Add py312 section to tox.ini [testenv]
- Minor whitespace change for new flake8

Change-Id: I4bb34ff406db607e9ccd26815eb8e44a3f6a23ee
This commit is contained in:
Myles Penner 2024-08-21 17:14:40 +00:00
parent 9706bba3cb
commit 6f2474ad9e
2 changed files with 10 additions and 3 deletions

View File

@ -45,6 +45,13 @@ commands =
charmcraft -v pack
{toxinidir}/rename.sh
[testenv:py312]
basepython = python3.12
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py310]
basepython = python3.10
deps =
@ -61,7 +68,7 @@ deps =
[testenv:pep8]
basepython = python3
deps = flake8==3.9.2
deps = flake8==7.1.1
git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} hooks unit_tests tests actions lib files
charm-proof

View File

@ -845,7 +845,7 @@ class NovaComputeRelationsTests(CharmTestCase):
get_request_states.return_value = {
'ceph:43': {'complete': True, 'sent': True}
}
_get_broker_rid_unit_for_previous_request.return_value = 'ceph:43',\
_get_broker_rid_unit_for_previous_request.return_value = 'ceph:43', \
'ceph-mon/0'
is_broker_action_done.return_value = False
hooks._handle_ceph_request()
@ -872,7 +872,7 @@ class NovaComputeRelationsTests(CharmTestCase):
get_request_states.return_value = {
'ceph:43': {'complete': True, 'sent': True}
}
_get_broker_rid_unit_for_previous_request.return_value = 'ceph:43',\
_get_broker_rid_unit_for_previous_request.return_value = 'ceph:43', \
'ceph-mon/0'
is_broker_action_done.return_value = True
hooks._handle_ceph_request()