From a68bea7477050544067030b6359ce86349ca979b Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 14 Jun 2023 00:56:56 +0300 Subject: [PATCH] dispatcher: forbid using base dispatcher --- src/mdis/dispatcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mdis/dispatcher.py b/src/mdis/dispatcher.py index be8e42e..3a5dc6c 100644 --- a/src/mdis/dispatcher.py +++ b/src/mdis/dispatcher.py @@ -43,3 +43,7 @@ class Dispatcher(metaclass=DispatcherMeta): if hook is None: hook = self.__class__.dispatch() return hook(dispatcher=self, instance=instance) + + @_core.hook(object) + def dispatch_object(self, instance): + raise NotImplementedError() -- 2.30.2