Skip to content

Commit 64bf08a

Browse files
committed
Format
1 parent cb994f9 commit 64bf08a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

distributed/http/scheduler/api.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def clean_dict(d):
3030
if not isinstance(d, dict):
3131
return d
3232
return {
33-
k: clean_dict(v)
34-
for k, v in d.items()
35-
if not isinstance(k, tuple)
33+
k: clean_dict(v) for k, v in d.items() if not isinstance(k, tuple)
3634
}
3735

3836
workers_info = clean_dict(workers_info)

distributed/http/scheduler/tests/test_scheduler_http.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ async def test_retire_workers_with_tuple_keys(c, s, a, b):
732732
aiohttp = pytest.importorskip("aiohttp")
733733

734734
worker_address = "tcp://172.17.0.3:39571"
735+
735736
async def mock_retire_workers(*args, **kwargs):
736737
# Return problematic data structure
737738
# tuple are not json serializable
@@ -740,10 +741,16 @@ async def mock_retire_workers(*args, **kwargs):
740741
"type": "Worker",
741742
"metrics": {
742743
"digests_total_since_heartbeat": {
743-
("execute", "slowadd", "thread-cpu", "seconds"): 0.0003396660000000093,
744+
(
745+
"execute",
746+
"slowadd",
747+
"thread-cpu",
748+
"seconds",
749+
): 0.0003396660000000093,
744750
},
745-
}
746-
}}
751+
},
752+
}
753+
}
747754

748755
# Replace the method with our mock
749756
s.retire_workers = mock_retire_workers

0 commit comments

Comments
 (0)