Skip to content

Commit

Permalink
multi interface fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alrik-durand committed Jun 2, 2020
1 parent 5cfd448 commit 80210fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __new__(cls, default_callable, is_abstractmethod=False):

def __init__(self, default_callable, is_abstractmethod=False):
self._obj = None
self._name = default_callable.__name__
if is_abstractmethod:
self._default_callable = abstractmethod(default_callable)
else:
Expand Down Expand Up @@ -100,7 +101,7 @@ def some_arbitrary_name2(self, *args, **kwargs):
def decorator(func):
self.registered[interface] = func
self.__isabstractmethod__ = False
InterfaceMethod._latest_unregistered_instances.pop(func.__name__, None)
InterfaceMethod._latest_unregistered_instances.pop(self._name, None)
return func
return decorator

Expand Down

0 comments on commit 80210fb

Please sign in to comment.