core: drop wrapper argument
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 13 Jun 2023 20:39:22 +0000 (23:39 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 13 Jun 2023 20:39:22 +0000 (23:39 +0300)
src/mdis/core.py

index 0af0e53c90ee3651eb88dc03fbd5ad193016597e..708f8d26b41ed2a37c862943d1287422ecf2ce00 100644 (file)
@@ -1,10 +1,9 @@
 class TypeidHook(object):
-    def __init__(self, *typeids, wrapper=lambda call: call):
+    def __init__(self, *typeids):
         for typeid in typeids:
             if not isinstance(typeid, type):
                 raise ValueError(typeid)
         self.__typeids = typeids
-        self.__wrapper = wrapper
         return super().__init__()
 
     def __iter__(self):
@@ -16,17 +15,17 @@ class TypeidHook(object):
     def __call__(self, call):
         if not callable(call):
             raise ValueError(call)
-        return CallHook(typeids=self, call=call, wrapper=self.__wrapper)
+        return CallHook(typeids=self, call=call)
 
 
 class CallHook(object):
-    def __init__(self, typeids, call, wrapper=lambda call: call):
+    def __init__(self, typeids, call):
         if not isinstance(typeids, TypeidHook):
             raise ValueError(typeids)
         if not callable(call):
             raise ValueError(call)
         self.__typeids = typeids
-        self.__call = wrapper(call)
+        self.__call = call
         return super().__init__()
 
     def __repr__(self):