From a8fe3733a0eb36d44122b8d44c94a9cf04652ad2 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Sun, 16 Jun 2024 07:53:26 +0200 Subject: [PATCH] Fixed new issues reported by new flake8 7.0.0 Signed-off-by: Andreas Maier --- changes/noissue.1.cleanup.rst | 1 + tests/unit/zhmcclient/test_utils.py | 4 ++-- zhmcclient_mock/_urihandler.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changes/noissue.1.cleanup.rst diff --git a/changes/noissue.1.cleanup.rst b/changes/noissue.1.cleanup.rst new file mode 100644 index 00000000..97c4973b --- /dev/null +++ b/changes/noissue.1.cleanup.rst @@ -0,0 +1 @@ +Fixed new issues reported by new flake8 7.0.0. diff --git a/tests/unit/zhmcclient/test_utils.py b/tests/unit/zhmcclient/test_utils.py index 9f1b700f..ace635da 100644 --- a/tests/unit/zhmcclient/test_utils.py +++ b/tests/unit/zhmcclient/test_utils.py @@ -67,8 +67,8 @@ ((3001, 1, 1, 8, 0, 0, 0), TS_3001_LIMIT + 1000), ((MAXYEAR - 1, 12, 31, 0, 0, 0, 0), TS_MAX + 1 - DAY_MS - 365 * DAY_MS), ((MAXYEAR, 12, 30, 0, 0, 0, 0), TS_MAX + 1 - 2 * DAY_MS), - ((MAXYEAR, 12, 30, 23, 59, 59, 0), TS_MAX + 1 - 2 * DAY_MS + \ - 23 * HOUR_MS + 59 * MIN_MS + 59 * SEC_MS), + ((MAXYEAR, 12, 30, 23, 59, 59, 0), + TS_MAX + 1 - 2 * DAY_MS + 23 * HOUR_MS + 59 * MIN_MS + 59 * SEC_MS), # The following testcases would be in range but are too close to the max # for pytz due to an implementation limitation: pytz.localize() checks the diff --git a/zhmcclient_mock/_urihandler.py b/zhmcclient_mock/_urihandler.py index 049dcc8a..dbb4d68a 100644 --- a/zhmcclient_mock/_urihandler.py +++ b/zhmcclient_mock/_urihandler.py @@ -5390,7 +5390,7 @@ def post(method, hmc, uri, uri_parms, body, logon_required, (r'/api/partitions/([^/]+)/hbas(?:\?(.*))?', HbasHandler), (r'/api/partitions/([^/]+)/hbas/([^?/]+)(?:\?(.*))?', HbaHandler), - (r'/api/partitions/([^/]+)/hbas/([^/]+)/operations/'\ + (r'/api/partitions/([^/]+)/hbas/([^/]+)/operations/' 'reassign-storage-adapter-port', HbaReassignPortHandler), (r'/api/partitions/([^/]+)/nics(?:\?(.*))?', NicsHandler),