dispatcher: forbid using base dispatcher
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 13 Jun 2023 21:56:56 +0000 (00:56 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 13 Jun 2023 22:01:14 +0000 (01:01 +0300)
src/mdis/dispatcher.py

index be8e42e3e0f2ba1bdadb46853b95190982d3d27b..3a5dc6ce8419cac76654c9b71593e89a014bcd3c 100644 (file)
@@ -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()