ops needs to check for subclass, not instance
This commit is contained in:
parent
1377e04d16
commit
687e22ac5e
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue