From 687e22ac5e1757147b33a167d6b5511ecb032b30 Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 17 Dec 2021 13:53:07 +0100 Subject: [PATCH] ops needs to check for subclass, not instance --- aiocraft/traits/callbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiocraft/traits/callbacks.py b/aiocraft/traits/callbacks.py index 91745ef..14ad8f3 100644 --- a/aiocraft/traits/callbacks.py +++ b/aiocraft/traits/callbacks.py @@ -17,7 +17,7 @@ class CallbacksHolder: self._tasks = {} def callback_keys(self, filter:Type = None) -> Set[Any]: - return set(x for x in self._callbacks.keys() if not filter or isinstance(x, filter)) + return set(x for x in self._callbacks.keys() if not filter or issubclass(x, filter)) def register(self, key:Any, callback:Callable): if key not in self._callbacks: