Removed service abc

This commit is contained in:
2021-03-29 13:29:26 +02:00
parent d0e3e1792f
commit f3be927440
10 changed files with 25 additions and 44 deletions

View File

@@ -1,13 +1,11 @@
from abc import abstractmethod
from cpl.dependency_injection.service_abc import ServiceABC
from abc import abstractmethod, ABC
class CommandABC(ServiceABC):
class CommandABC(ABC):
@abstractmethod
def __init__(self):
ServiceABC.__init__(self)
ABC.__init__(self)
@abstractmethod
def run(self, args: list[str]): pass

View File

@@ -1,14 +1,14 @@
import os
from abc import ABC
from cpl.configuration.configuration_abc import ConfigurationABC
from cpl.console.console import Console
from cpl.dependency_injection.service_abc import ServiceABC
from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
from cpl_cli.error import Error
from cpl_cli.command_model import CommandModel
class CommandHandler(ServiceABC):
class CommandHandler(ABC):
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
"""
@@ -16,7 +16,7 @@ class CommandHandler(ServiceABC):
:param config:
:param services:
"""
ServiceABC.__init__(self)
ABC.__init__(self)
self._config = config
self._env = self._config.environment

View File

@@ -1,5 +1,6 @@
import os
import time
from abc import ABC
from contextlib import suppress
import psutil as psutil
@@ -7,13 +8,12 @@ from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
from cpl.console.console import Console
from cpl.dependency_injection.service_abc import ServiceABC
from cpl.environment.application_environment_abc import ApplicationEnvironmentABC
from cpl_cli.configuration.build_settings import BuildSettings
from cpl_cli.live_server.live_server_thread import LiveServerThread
class LiveServerService(ServiceABC, FileSystemEventHandler):
class LiveServerService(ABC, FileSystemEventHandler):
def __init__(self, env: ApplicationEnvironmentABC, build_settings: BuildSettings):
"""
@@ -21,7 +21,7 @@ class LiveServerService(ServiceABC, FileSystemEventHandler):
:param env:
:param build_settings:
"""
ServiceABC.__init__(self)
ABC.__init__(self)
FileSystemEventHandler.__init__(self)
self._env = env

View File

@@ -1,13 +1,11 @@
from abc import abstractmethod
from cpl.dependency_injection.service_abc import ServiceABC
from abc import abstractmethod, ABC
class PublisherABC(ServiceABC):
class PublisherABC(ABC):
@abstractmethod
def __init__(self):
ServiceABC.__init__(self)
ABC.__init__(self)
@property
@abstractmethod