2021.4 #19
@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from abc import ABC
|
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
|
||||||
import psutil as psutil
|
import psutil as psutil
|
||||||
@ -13,7 +12,7 @@ from cpl_cli.configuration.build_settings import BuildSettings
|
|||||||
from cpl_cli.live_server.live_server_thread import LiveServerThread
|
from cpl_cli.live_server.live_server_thread import LiveServerThread
|
||||||
|
|
||||||
|
|
||||||
class LiveServerService(ABC, FileSystemEventHandler):
|
class LiveServerService(FileSystemEventHandler):
|
||||||
|
|
||||||
def __init__(self, env: ApplicationEnvironmentABC, build_settings: BuildSettings):
|
def __init__(self, env: ApplicationEnvironmentABC, build_settings: BuildSettings):
|
||||||
"""
|
"""
|
||||||
@ -21,7 +20,6 @@ class LiveServerService(ABC, FileSystemEventHandler):
|
|||||||
:param env:
|
:param env:
|
||||||
:param build_settings:
|
:param build_settings:
|
||||||
"""
|
"""
|
||||||
ABC.__init__(self)
|
|
||||||
FileSystemEventHandler.__init__(self)
|
FileSystemEventHandler.__init__(self)
|
||||||
|
|
||||||
self._env = env
|
self._env = env
|
||||||
|
@ -14,13 +14,10 @@ class ServiceTemplate(TemplateFileABC):
|
|||||||
self._class_name = f'{String.first_to_upper(name)}{schematic_upper}'
|
self._class_name = f'{String.first_to_upper(name)}{schematic_upper}'
|
||||||
self._path = path
|
self._path = path
|
||||||
self._value = textwrap.dedent("""\
|
self._value = textwrap.dedent("""\
|
||||||
from cpl.dependency_injection import ServiceABC
|
class $Name:
|
||||||
|
|
||||||
|
|
||||||
class $Name(ServiceABC):
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
ServiceABC.__init__(self)
|
pass
|
||||||
""")
|
""")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user