Removed service abc
This commit is contained in:
@@ -20,7 +20,6 @@ __version__ = '2021.4.2.dev1'
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
from .service_abc import ServiceABC
|
||||
from .service_collection import ServiceCollection
|
||||
from .service_collection_abc import ServiceCollectionABC
|
||||
from .service_descriptor import ServiceDescriptor
|
||||
|
@@ -1,11 +0,0 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class ServiceABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC to represent a service
|
||||
"""
|
||||
pass
|
@@ -1,8 +1,6 @@
|
||||
from abc import abstractmethod, ABC
|
||||
from collections import Callable
|
||||
from typing import Type
|
||||
|
||||
from cpl.dependency_injection.service_abc import ServiceABC
|
||||
from typing import Type, Optional
|
||||
|
||||
|
||||
class ServiceProviderABC(ABC):
|
||||
@@ -24,7 +22,7 @@ class ServiceProviderABC(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_service(self, instance_type: Type) -> Callable[ServiceABC]:
|
||||
def get_service(self, instance_type: Type) -> Optional[Callable[object]]:
|
||||
"""
|
||||
Returns instance of given type
|
||||
:param instance_type:
|
||||
|
@@ -1,16 +1,14 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
from cpl.dependency_injection.service_abc import ServiceABC
|
||||
from abc import abstractmethod, ABC
|
||||
|
||||
|
||||
class LoggerABC(ServiceABC):
|
||||
class LoggerABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC for logging
|
||||
"""
|
||||
ServiceABC.__init__(self)
|
||||
ABC.__init__(self)
|
||||
|
||||
@abstractmethod
|
||||
def header(self, string: str):
|
||||
|
@@ -1,17 +1,16 @@
|
||||
from abc import abstractmethod
|
||||
from abc import abstractmethod, ABC
|
||||
|
||||
from cpl.dependency_injection.service_abc import ServiceABC
|
||||
from cpl.mailing.email import EMail
|
||||
|
||||
|
||||
class EMailClientABC(ServiceABC):
|
||||
class EMailClientABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC to send emails
|
||||
"""
|
||||
ServiceABC.__init__(self)
|
||||
ABC.__init__(self)
|
||||
|
||||
@abstractmethod
|
||||
def connect(self):
|
||||
|
Reference in New Issue
Block a user