Renamed by internal conventions

This commit is contained in:
2021-03-12 16:06:30 +01:00
parent b3b65f3dd2
commit 2580d4b6cf
43 changed files with 202 additions and 202 deletions

View File

@@ -3,7 +3,7 @@ from cpl_cli.command_abc import CommandABC
from cpl_cli.publish.publisher_abc import PublisherABC
class Build(CommandABC):
class BuildService(CommandABC):
def __init__(self, publisher: PublisherABC):
CommandABC.__init__(self)

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_enum import ForegroundColor
from cpl.console.foreground_color_enum import ForegroundColorEnum
from cpl.console.console import Console
from cpl.utils.string import String
from cpl_cli.command_abc import CommandABC
@@ -16,7 +16,7 @@ from cpl_cli.templates.generate.thread_template import ThreadTemplate
from cpl_cli.templates.template_file_abc import TemplateFileABC
class Generate(CommandABC):
class GenerateService(CommandABC):
def __init__(self, configuration: ConfigurationABC, runtime: ApplicationRuntimeABC):
CommandABC.__init__(self)
@@ -99,8 +99,8 @@ class Generate(CommandABC):
self._create_file,
file_path,
template.value,
text_foreground_color=ForegroundColor.green,
spinner_foreground_color=ForegroundColor.cyan
text_foreground_color=ForegroundColorEnum.green,
spinner_foreground_color=ForegroundColorEnum.cyan
)
def run(self, args: list[str]):

View File

@@ -1,9 +1,9 @@
from cpl.console.console import Console
from cpl.console.foreground_color_enum import ForegroundColor
from cpl.console.foreground_color_enum import ForegroundColorEnum
from cpl_cli.command_abc import CommandABC
class Help(CommandABC):
class HelpService(CommandABC):
def __init__(self):
CommandABC.__init__(self)
@@ -21,9 +21,9 @@ class Help(CommandABC):
['version (v|V)', 'Outputs CPL CLI version.']
]
for name, description in commands:
Console.set_foreground_color(ForegroundColor.blue)
Console.set_foreground_color(ForegroundColorEnum.blue)
Console.write(f'\n\t{name} ')
Console.set_foreground_color(ForegroundColor.default)
Console.set_foreground_color(ForegroundColorEnum.default)
Console.write(f'{description}')
Console.write('\n')

View File

@@ -6,14 +6,14 @@ from typing import Optional
from cpl.application.application_runtime_abc import ApplicationRuntimeABC
from cpl.configuration.configuration_abc import ConfigurationABC
from cpl.console.foreground_color_enum import ForegroundColor
from cpl.console.foreground_color_enum import ForegroundColorEnum
from cpl.console.console import Console
from cpl_cli.command_abc import CommandABC
from cpl_cli.configuration.build_settings import BuildSettings
from cpl_cli.configuration.build_settings_name import BuildSettingsName
from cpl_cli.configuration.build_settings_name_enum import BuildSettingsName
from cpl_cli.configuration.project_settings import ProjectSettings
from cpl_cli.configuration.project_settings_name import ProjectSettingsName
from cpl_cli.configuration.version_settings_name import VersionSettingsName
from cpl_cli.configuration.project_settings_name_enum import ProjectSettingsName
from cpl_cli.configuration.version_settings_name_enum import VersionSettingsName
from cpl_cli.templates.new.console.license import LicenseTemplate
from cpl_cli.templates.new.console.readme_py import ReadmeTemplate
from cpl_cli.templates.new.console.src.application import ApplicationTemplate
@@ -23,7 +23,7 @@ from cpl_cli.templates.new.console.src.tests.init import TestsInitTemplate
from cpl_cli.templates.template_file_abc import TemplateFileABC
class New(CommandABC):
class NewService(CommandABC):
def __init__(self, configuration: ConfigurationABC, runtime: ApplicationRuntimeABC):
CommandABC.__init__(self)
@@ -106,7 +106,7 @@ class New(CommandABC):
if result.lower() == 'y':
self._use_startup = True
Console.set_foreground_color(ForegroundColor.default)
Console.set_foreground_color(ForegroundColorEnum.default)
# else:
# result = Console.read('Do you want to use service providing? (y/n) ')
@@ -142,8 +142,8 @@ class New(CommandABC):
self._create_template,
project_path,
template,
text_foreground_color=ForegroundColor.green,
spinner_foreground_color=ForegroundColor.cyan
text_foreground_color=ForegroundColorEnum.green,
spinner_foreground_color=ForegroundColorEnum.cyan
)
@staticmethod

View File

@@ -3,7 +3,7 @@ from cpl_cli.command_abc import CommandABC
from cpl_cli.publish.publisher_abc import PublisherABC
class Publish(CommandABC):
class PublishService(CommandABC):
def __init__(self, publisher: PublisherABC):
CommandABC.__init__(self)

View File

@@ -7,19 +7,19 @@ import pkg_resources
import cpl
import cpl_cli
from cpl.console.console import Console
from cpl.console.foreground_color_enum import ForegroundColor
from cpl.console.foreground_color_enum import ForegroundColorEnum
from cpl_cli.command_abc import CommandABC
class Version(CommandABC):
class VersionService(CommandABC):
def __init__(self):
CommandABC.__init__(self)
def run(self, args: list[str]):
Console.set_foreground_color(ForegroundColor.yellow)
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.banner('CPL CLI')
Console.set_foreground_color(ForegroundColor.default)
Console.set_foreground_color(ForegroundColorEnum.default)
if '__version__' in dir(cpl_cli):
Console.write_line(f'Common Python library CLI: ')
Console.write(cpl_cli.__version__)