Renamed by internal convention
This commit is contained in:
@@ -3,7 +3,7 @@ from collections import Callable
|
||||
|
||||
from cpl.application.application_abc import ApplicationRuntimeABC
|
||||
from cpl.configuration.configuration_abc import ConfigurationABC
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl.console.console import Console
|
||||
from cpl.utils.string import String
|
||||
from cpl_cli.command_abc import CommandABC
|
||||
@@ -26,7 +26,7 @@ class Generate(CommandABC):
|
||||
"Template": ABCTemplate
|
||||
},
|
||||
"class": {
|
||||
"Upper": "Class",
|
||||
"Upper": "",
|
||||
"Template": ClassTemplate
|
||||
},
|
||||
"enum": {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
from cpl.console.console import Console
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl_cli.command_abc import CommandABC
|
||||
|
||||
|
||||
|
@@ -6,7 +6,7 @@ from typing import Optional
|
||||
|
||||
from cpl.application.application_runtime_abc import ApplicationRuntimeABC
|
||||
from cpl.configuration.configuration_abc import ConfigurationABC
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl.console.console import Console
|
||||
from cpl_cli.command_abc import CommandABC
|
||||
from cpl_cli.configuration.build_settings import BuildSettings
|
||||
|
@@ -7,7 +7,7 @@ import pkg_resources
|
||||
import cpl
|
||||
import cpl_cli
|
||||
from cpl.console.console import Console
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl_cli.command_abc import CommandABC
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@ from typing import Optional
|
||||
|
||||
from cpl.configuration.configuration_model_abc import ConfigurationModelABC
|
||||
from cpl.console.console import Console
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl_cli.configuration.build_settings_name import BuildSettingsName
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@ from typing import Optional
|
||||
|
||||
from cpl.configuration.configuration_model_abc import ConfigurationModelABC
|
||||
from cpl.console.console import Console
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl_cli.configuration.version import Version
|
||||
from cpl_cli.configuration.project_settings_name import ProjectSettingsName
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import setuptools
|
||||
from setuptools import sandbox
|
||||
|
||||
from cpl.application.application_runtime_abc import ApplicationRuntimeABC
|
||||
from cpl.console.foreground_color import ForegroundColor
|
||||
from cpl.console.foreground_color_enum import ForegroundColor
|
||||
from cpl.console.console import Console
|
||||
from cpl_cli.configuration.build_settings import BuildSettings
|
||||
from cpl_cli.configuration.project_settings import ProjectSettings
|
||||
|
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
sh_cpl sh-edraft Common Python library
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
sh-edraft Common Python library
|
||||
|
||||
:copyright: (c) 2020 - 2021 sh-edraft.de
|
||||
:license: MIT, see LICENSE for more details.
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'cpl_cli.templates.generate'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2021 sh-edraft.de'
|
||||
__version__ = '2021.4.1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major=2021, minor=4, micro=1)
|
||||
|
@@ -10,8 +10,8 @@ class ClassTemplate(TemplateFileABC):
|
||||
def __init__(self, name: str, schematic: str, schematic_upper: str, path: str):
|
||||
TemplateFileABC.__init__(self)
|
||||
|
||||
self._name = f'{String.convert_to_snake_case(name)}_{schematic}.py'
|
||||
self._class_name = f'{String.first_to_upper(name)}{schematic_upper}'
|
||||
self._name = f'{String.convert_to_snake_case(name)}.py'
|
||||
self._class_name = f'{String.first_to_upper(name)}'
|
||||
self._path = path
|
||||
self._value = textwrap.dedent("""\
|
||||
class $Name:
|
||||
|
Reference in New Issue
Block a user