Renamed by internal convention

This commit is contained in:
2021-03-12 15:58:30 +01:00
parent 8a95c03038
commit ac63751583
40 changed files with 92 additions and 65 deletions

View File

@@ -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": {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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: