Bugfixes for new lib

This commit is contained in:
Sven Heidemann 2021-03-31 12:11:19 +02:00
parent b22d04b145
commit eef8488ca2
4 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import textwrap
from cpl.utils.string import String
from cpl_cli.templates.template_file_abc import TemplateFileABC
@ -8,6 +9,7 @@ class ApplicationTemplate(TemplateFileABC):
def __init__(self, name: str):
TemplateFileABC.__init__(self)
name = String.convert_to_snake_case(name)
self._name = 'application.py'
self._path = f'src/{name}_cli/'
self._value = textwrap.dedent("""\

View File

@ -1,5 +1,6 @@
import textwrap
from cpl.utils.string import String
from cpl_cli.templates.template_file_abc import TemplateFileABC
@ -8,6 +9,7 @@ class CLIInitTemplate(TemplateFileABC):
def __init__(self, name: str):
TemplateFileABC.__init__(self)
name = String.convert_to_snake_case(name)
self._name = '__init__.py'
self._path = f'src/{name}_cli/'
self._value = textwrap.dedent("""\

View File

@ -1,5 +1,6 @@
import textwrap
from cpl.utils.string import String
from cpl_cli.templates.template_file_abc import TemplateFileABC
@ -8,6 +9,7 @@ class MainWithApplicationHostAndStartupTemplate(TemplateFileABC):
def __init__(self, name: str):
TemplateFileABC.__init__(self)
name = String.convert_to_snake_case(name)
self._name = 'main.py'
self._path = f'src/{name}_cli/'
self._value = textwrap.dedent(f"""\

View File

@ -1,5 +1,6 @@
import textwrap
from cpl.utils.string import String
from cpl_cli.templates.template_file_abc import TemplateFileABC
@ -8,6 +9,7 @@ class StartupTemplate(TemplateFileABC):
def __init__(self, name: str):
TemplateFileABC.__init__(self)
name = String.convert_to_snake_case(name)
self._name = 'startup.py'
self._path = f'src/{name}_cli/'
self._value = textwrap.dedent("""\