From 49e19c010b101c629691c73d62caee7140bb92d9 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 6 Jan 2021 19:23:51 -0800 Subject: [PATCH] Type `TaskGroup` in `active_states` (#4408) This was missing a type annotation before, which results in issues when accessing `_states` when compiled. This fixes that issue. --- distributed/scheduler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/distributed/scheduler.py b/distributed/scheduler.py index af28226388..fe8d1c61f8 100644 --- a/distributed/scheduler.py +++ b/distributed/scheduler.py @@ -708,6 +708,7 @@ def active(self): @property def active_states(self): + tg: TaskGroup return merge_with(sum, [tg._states for tg in self.active]) def __repr__(self):