From d05ea436e81ce573006ab6e89257728d98b68a17 Mon Sep 17 00:00:00 2001 From: crusaderky Date: Mon, 27 Mar 2023 21:43:29 +0100 Subject: [PATCH 1/2] Remove mypy warning in test_client --- distributed/tests/test_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distributed/tests/test_client.py b/distributed/tests/test_client.py index 7d593df319..f4dc4f48c2 100644 --- a/distributed/tests/test_client.py +++ b/distributed/tests/test_client.py @@ -76,7 +76,7 @@ from distributed.cluster_dump import load_cluster_dump from distributed.comm import CommClosedError from distributed.compatibility import LINUX, WINDOWS -from distributed.core import ErrorMessage, Status +from distributed.core import Status from distributed.diagnostics.plugin import WorkerPlugin from distributed.metrics import time from distributed.scheduler import CollectTaskMetaDataPlugin, KilledWorker, Scheduler @@ -4822,13 +4822,13 @@ async def fail_instantiate(*_args, **_kwargs): a.instantiate = fail_instantiate if raise_for_error: # default is to raise - with pytest.raises(ValueError, match="broken") as excinfo: + with pytest.raises(ValueError, match="broken"): await c.restart_workers(workers=[a.worker_address]) else: results = await c.restart_workers( workers=[a.worker_address], raise_for_error=raise_for_error ) - msg: ErrorMessage = results[a.worker_address] + msg = results[a.worker_address] assert msg["status"] == "error" assert msg["exception_text"] == "ValueError('broken')" From a5271f6676966508a2be38d368a768da7bbf6916 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Mon, 27 Mar 2023 17:10:45 -0500 Subject: [PATCH 2/2] [skip-caching]