diff --git a/injection/core/module.py b/injection/core/module.py index fbc3308..5f78485 100644 --- a/injection/core/module.py +++ b/injection/core/module.py @@ -135,13 +135,15 @@ def __str__(self) -> str: class Injectable(Protocol[_T]): __slots__ = () - def __init__(self, __factory: Callable[[], _T] = ..., /): ... + def __init__(self, __factory: Callable[[], _T] = None, /): + pass @property def is_locked(self) -> bool: return False - def unlock(self): ... + def unlock(self): + pass @abstractmethod def get_instance(self) -> _T: @@ -626,7 +628,8 @@ def update(self, module: Module): return self @singledispatchmethod - def on_event(self, event: Event, /): ... + def on_event(self, event: Event, /): + pass @on_event.register @contextmanager diff --git a/injection/exceptions.py b/injection/exceptions.py index 9a4646c..c9b98a4 100644 --- a/injection/exceptions.py +++ b/injection/exceptions.py @@ -10,7 +10,7 @@ class InjectionError(Exception): - __slots__ = () + pass class NoInjectable(KeyError, InjectionError): @@ -26,12 +26,12 @@ def cls(self) -> type: class ModuleError(InjectionError): - __slots__ = () + pass class ModuleLockError(ModuleError): - __slots__ = () + pass class ModuleNotUsedError(KeyError, ModuleError): - __slots__ = () + pass