From 5804420b88cddeda9e909af05b3b5c08fdd6cf1d Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Wed, 12 Apr 2023 15:32:00 +0000 Subject: [PATCH] Upgrade mypy --- parsl/monitoring/monitoring.py | 7 ++++++- test-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/parsl/monitoring/monitoring.py b/parsl/monitoring/monitoring.py index 8a238d2b4e..783ee8d098 100644 --- a/parsl/monitoring/monitoring.py +++ b/parsl/monitoring/monitoring.py @@ -463,7 +463,12 @@ def start(self, if 'exit_now' in msg[1] and msg[1]['exit_now']: router_keep_going = False else: - self.logger.error(f"Discarding message from interchange with unknown type {msg[0].value}") + # There is a type: ignore here because if msg[0] + # is of the correct type, this code is unreachable, + # but there is no verification that the message + # received from ic_channel.recv_pyobj() is actually + # of that type. + self.logger.error(f"Discarding message from interchange with unknown type {msg[0].value}") # type: ignore[unreachable] except zmq.Again: pass except Exception: diff --git a/test-requirements.txt b/test-requirements.txt index bbca07b128..aa492ef5ce 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ pytest-random-order mock>=1.0.0 nbsphinx sphinx_rtd_theme -mypy==1.1.1 +mypy==1.5.1 types-python-dateutil types-requests types-six