diff --git a/src/kiwi/_constants.py b/src/kiwi/_constants.py index 8c33fed..be0ab6d 100644 --- a/src/kiwi/_constants.py +++ b/src/kiwi/_constants.py @@ -1,7 +1,6 @@ # system import os - ############# # ENVIRONMENT @@ -10,7 +9,6 @@ KIWI_ROOT = os.getenv('KIWI_ROOT', ".") # default name of kiwi-scp file KIWI_CONF_NAME = os.getenv('KIWI_CONF_NAME', "kiwi.yml") - ############ # FILE NAMES @@ -27,7 +25,6 @@ CONF_DIRECTORY_NAME = 'conf' # location for auxiliary Dockerfiles IMAGES_DIRECTORY_NAME = f"{KIWI_ROOT}/images" - #################### # DOCKER IMAGE NAMES diff --git a/src/kiwi/misc.py b/src/kiwi/misc.py index 221b9c3..ed91da9 100644 --- a/src/kiwi/misc.py +++ b/src/kiwi/misc.py @@ -1,6 +1,6 @@ def _surround(string, bang): midlane = f"{bang * 3} {string} {bang * 3}" - sidelane = bang*len(midlane) + sidelane = bang * len(midlane) return f"{sidelane}\n{midlane}\n{sidelane}" diff --git a/src/kiwi/project.py b/src/kiwi/project.py index 7a11fc0..60a3fbd 100644 --- a/src/kiwi/project.py +++ b/src/kiwi/project.py @@ -1,10 +1,9 @@ import logging import os -from .executable import Executable - from ._constants import CONF_DIRECTORY_NAME from .config import LoadedConfig +from .executable import Executable class Project: diff --git a/src/kiwi/subcommands/_hidden.py b/src/kiwi/subcommands/_hidden.py index 28ce50d..d3e0901 100644 --- a/src/kiwi/subcommands/_hidden.py +++ b/src/kiwi/subcommands/_hidden.py @@ -4,11 +4,11 @@ import subprocess # local from .._constants import CONF_DIRECTORY_NAME -from ..executable import Executable -from ..subcommand import SubCommand from ..config import LoadedConfig +from ..executable import Executable from ..projects import Projects from ..rootkit import Rootkit, prefix_path_mnt +from ..subcommand import SubCommand class ConfCopyCommand(SubCommand): diff --git a/src/kiwi/subcommands/down.py b/src/kiwi/subcommands/down.py index 9c4032f..b0a1147 100644 --- a/src/kiwi/subcommands/down.py +++ b/src/kiwi/subcommands/down.py @@ -4,10 +4,10 @@ import subprocess # local from ._hidden import _find_net -from ..subcommand import ServiceCommand from ..config import LoadedConfig from ..executable import Executable from ..misc import are_you_sure +from ..subcommand import ServiceCommand class DownCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/init.py b/src/kiwi/subcommands/init.py index d5174be..1ca9c6a 100644 --- a/src/kiwi/subcommands/init.py +++ b/src/kiwi/subcommands/init.py @@ -4,8 +4,8 @@ import os # local from .._constants import KIWI_CONF_NAME -from ..subcommand import SubCommand from ..config import DefaultConfig, LoadedConfig +from ..subcommand import SubCommand class InitCommand(SubCommand): @@ -42,7 +42,6 @@ class InitCommand(SubCommand): # check force switch if args.force and os.path.isfile(KIWI_CONF_NAME): - logging.warning(f"Overwriting existing '{KIWI_CONF_NAME}'!") config = DefaultConfig.get() diff --git a/src/kiwi/subcommands/purge.py b/src/kiwi/subcommands/purge.py index 2200302..86cd372 100644 --- a/src/kiwi/subcommands/purge.py +++ b/src/kiwi/subcommands/purge.py @@ -4,10 +4,10 @@ import subprocess # local from ._hidden import _find_net -from ..subcommand import SubCommand from ..config import LoadedConfig from ..executable import Executable from ..misc import are_you_sure +from ..subcommand import SubCommand class PurgeCommand(SubCommand): diff --git a/src/kiwi/subcommands/restart.py b/src/kiwi/subcommands/restart.py index d8856c9..86fce22 100644 --- a/src/kiwi/subcommands/restart.py +++ b/src/kiwi/subcommands/restart.py @@ -1,6 +1,6 @@ # local -from ..subcommand import ServiceCommand from ..misc import are_you_sure +from ..subcommand import ServiceCommand class RestartCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/shell.py b/src/kiwi/subcommands/shell.py index 6ae4a0f..7547ced 100644 --- a/src/kiwi/subcommands/shell.py +++ b/src/kiwi/subcommands/shell.py @@ -2,9 +2,9 @@ import logging import subprocess +from ..config import LoadedConfig # local from ..subcommand import ServiceCommand -from ..config import LoadedConfig def _service_has_executable(project, service, exe_name): @@ -52,7 +52,7 @@ def _find_shell(args, project, service): elif i + 1 < len(shells): # try next in list - logging.info(f"Shell '{shell}' not found in container, trying '{shells[i+1]}'") + logging.info(f"Shell '{shell}' not found in container, trying '{shells[i + 1]}'") elif args.shell: # not found, user suggestion provided diff --git a/src/kiwi/subcommands/show.py b/src/kiwi/subcommands/show.py index 23ee8ce..d8e7a34 100644 --- a/src/kiwi/subcommands/show.py +++ b/src/kiwi/subcommands/show.py @@ -3,10 +3,10 @@ import logging import os import yaml -# local -from ..subcommand import ServiceCommand from ..project import Project from ..projects import Projects +# local +from ..subcommand import ServiceCommand def _print_list(strings): diff --git a/src/kiwi/subcommands/update.py b/src/kiwi/subcommands/update.py index 0440cdc..35bc6dd 100644 --- a/src/kiwi/subcommands/update.py +++ b/src/kiwi/subcommands/update.py @@ -1,6 +1,6 @@ # local -from ..subcommand import ServiceCommand from ..misc import are_you_sure +from ..subcommand import ServiceCommand class UpdateCommand(ServiceCommand): @@ -8,7 +8,7 @@ class UpdateCommand(ServiceCommand): def __init__(self): super().__init__( - 'update', num_projects='?', num_services='*', + 'update', num_projects='?', num_services='*', action="Updating", description="Update the whole instance, a project or service(s) inside a project" )