Bugfixes for new lib
This commit is contained in:
parent
b22d04b145
commit
eef8488ca2
@ -1,5 +1,6 @@
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from cpl.utils.string import String
|
||||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||||
|
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ class ApplicationTemplate(TemplateFileABC):
|
|||||||
def __init__(self, name: str):
|
def __init__(self, name: str):
|
||||||
TemplateFileABC.__init__(self)
|
TemplateFileABC.__init__(self)
|
||||||
|
|
||||||
|
name = String.convert_to_snake_case(name)
|
||||||
self._name = 'application.py'
|
self._name = 'application.py'
|
||||||
self._path = f'src/{name}_cli/'
|
self._path = f'src/{name}_cli/'
|
||||||
self._value = textwrap.dedent("""\
|
self._value = textwrap.dedent("""\
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from cpl.utils.string import String
|
||||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||||
|
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ class CLIInitTemplate(TemplateFileABC):
|
|||||||
def __init__(self, name: str):
|
def __init__(self, name: str):
|
||||||
TemplateFileABC.__init__(self)
|
TemplateFileABC.__init__(self)
|
||||||
|
|
||||||
|
name = String.convert_to_snake_case(name)
|
||||||
self._name = '__init__.py'
|
self._name = '__init__.py'
|
||||||
self._path = f'src/{name}_cli/'
|
self._path = f'src/{name}_cli/'
|
||||||
self._value = textwrap.dedent("""\
|
self._value = textwrap.dedent("""\
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from cpl.utils.string import String
|
||||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||||
|
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ class MainWithApplicationHostAndStartupTemplate(TemplateFileABC):
|
|||||||
def __init__(self, name: str):
|
def __init__(self, name: str):
|
||||||
TemplateFileABC.__init__(self)
|
TemplateFileABC.__init__(self)
|
||||||
|
|
||||||
|
name = String.convert_to_snake_case(name)
|
||||||
self._name = 'main.py'
|
self._name = 'main.py'
|
||||||
self._path = f'src/{name}_cli/'
|
self._path = f'src/{name}_cli/'
|
||||||
self._value = textwrap.dedent(f"""\
|
self._value = textwrap.dedent(f"""\
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from cpl.utils.string import String
|
||||||
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
from cpl_cli.templates.template_file_abc import TemplateFileABC
|
||||||
|
|
||||||
|
|
||||||
@ -8,6 +9,7 @@ class StartupTemplate(TemplateFileABC):
|
|||||||
def __init__(self, name: str):
|
def __init__(self, name: str):
|
||||||
TemplateFileABC.__init__(self)
|
TemplateFileABC.__init__(self)
|
||||||
|
|
||||||
|
name = String.convert_to_snake_case(name)
|
||||||
self._name = 'startup.py'
|
self._name = 'startup.py'
|
||||||
self._path = f'src/{name}_cli/'
|
self._path = f'src/{name}_cli/'
|
||||||
self._value = textwrap.dedent("""\
|
self._value = textwrap.dedent("""\
|
||||||
|
Loading…
Reference in New Issue
Block a user