From bf5bed87347476072e542e00f1ba7eeddc4ad24e Mon Sep 17 00:00:00 2001 From: ldericher Date: Wed, 19 Aug 2020 17:21:38 +0200 Subject: [PATCH] move subcommand.py --- src/kiwi/executable.py | 2 +- src/kiwi/{subcommands/_subcommand.py => subcommand.py} | 6 +++--- src/kiwi/subcommands/build.py | 2 +- src/kiwi/subcommands/cmd.py | 2 +- src/kiwi/subcommands/conf.py | 4 +--- src/kiwi/subcommands/disable.py | 2 +- src/kiwi/subcommands/down.py | 2 +- src/kiwi/subcommands/enable.py | 2 +- src/kiwi/subcommands/init.py | 4 +--- src/kiwi/subcommands/list.py | 4 +--- src/kiwi/subcommands/logs.py | 2 +- src/kiwi/subcommands/net.py | 4 +--- src/kiwi/subcommands/new.py | 4 +--- src/kiwi/subcommands/pull.py | 2 +- src/kiwi/subcommands/push.py | 2 +- src/kiwi/subcommands/sh.py | 4 +--- src/kiwi/subcommands/show.py | 4 +--- src/kiwi/subcommands/up.py | 2 +- src/kiwi/subcommands/update.py | 4 +--- 19 files changed, 21 insertions(+), 37 deletions(-) rename src/kiwi/{subcommands/_subcommand.py => subcommand.py} (98%) diff --git a/src/kiwi/executable.py b/src/kiwi/executable.py index 4681f92..9f8aa8d 100644 --- a/src/kiwi/executable.py +++ b/src/kiwi/executable.py @@ -3,7 +3,7 @@ import logging import os import subprocess -# parent +# local from .config import LoadedConfig diff --git a/src/kiwi/subcommands/_subcommand.py b/src/kiwi/subcommand.py similarity index 98% rename from src/kiwi/subcommands/_subcommand.py rename to src/kiwi/subcommand.py index 1925bc7..18b518a 100644 --- a/src/kiwi/subcommands/_subcommand.py +++ b/src/kiwi/subcommand.py @@ -2,9 +2,9 @@ import logging import os -# parent -from ..parser import Parser -from ..project import Projects +# local +from .parser import Parser +from .project import Projects class SubCommand: diff --git a/src/kiwi/subcommands/build.py b/src/kiwi/subcommands/build.py index ed4b4a6..35cb4e5 100644 --- a/src/kiwi/subcommands/build.py +++ b/src/kiwi/subcommands/build.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand class BuildCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/cmd.py b/src/kiwi/subcommands/cmd.py index 0b12122..da90fc9 100644 --- a/src/kiwi/subcommands/cmd.py +++ b/src/kiwi/subcommands/cmd.py @@ -2,7 +2,7 @@ import logging # local -from ._subcommand import ProjectCommand +from ..subcommand import ProjectCommand class CmdCommand(ProjectCommand): diff --git a/src/kiwi/subcommands/conf.py b/src/kiwi/subcommands/conf.py index 0d590d1..77296fb 100644 --- a/src/kiwi/subcommands/conf.py +++ b/src/kiwi/subcommands/conf.py @@ -3,10 +3,8 @@ import logging import subprocess # local -from ._subcommand import SubCommand - -# parent from .._constants import CONF_DIRECTORY_NAME +from ..subcommand import SubCommand from ..config import LoadedConfig from ..project import Projects from ..rootkit import Rootkit, prefix_path_mnt diff --git a/src/kiwi/subcommands/disable.py b/src/kiwi/subcommands/disable.py index 82f8e5c..9715c27 100644 --- a/src/kiwi/subcommands/disable.py +++ b/src/kiwi/subcommands/disable.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ProjectCommand +from ..subcommand import ProjectCommand class DisableCommand(ProjectCommand): diff --git a/src/kiwi/subcommands/down.py b/src/kiwi/subcommands/down.py index cd838fb..213eca9 100644 --- a/src/kiwi/subcommands/down.py +++ b/src/kiwi/subcommands/down.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand from ..misc import are_you_sure diff --git a/src/kiwi/subcommands/enable.py b/src/kiwi/subcommands/enable.py index d0ea8a0..cf4079e 100644 --- a/src/kiwi/subcommands/enable.py +++ b/src/kiwi/subcommands/enable.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ProjectCommand +from ..subcommand import ProjectCommand class EnableCommand(ProjectCommand): diff --git a/src/kiwi/subcommands/init.py b/src/kiwi/subcommands/init.py index 5f9298a..0a2cc4e 100644 --- a/src/kiwi/subcommands/init.py +++ b/src/kiwi/subcommands/init.py @@ -3,10 +3,8 @@ import logging import os # local -from ._subcommand import SubCommand - -# parent (display purposes only) from .._constants import KIWI_CONF_NAME +from ..subcommand import SubCommand from ..config import DefaultConfig, LoadedConfig diff --git a/src/kiwi/subcommands/list.py b/src/kiwi/subcommands/list.py index 406ecb9..63e773d 100644 --- a/src/kiwi/subcommands/list.py +++ b/src/kiwi/subcommands/list.py @@ -4,9 +4,7 @@ import os import yaml # local -from ._subcommand import ServiceCommand - -# parent +from ..subcommand import ServiceCommand from ..project import Project, Projects diff --git a/src/kiwi/subcommands/logs.py b/src/kiwi/subcommands/logs.py index fcb1d3f..b2d49b7 100644 --- a/src/kiwi/subcommands/logs.py +++ b/src/kiwi/subcommands/logs.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand class LogsCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/net.py b/src/kiwi/subcommands/net.py index 30a25ad..9db49a5 100644 --- a/src/kiwi/subcommands/net.py +++ b/src/kiwi/subcommands/net.py @@ -3,9 +3,7 @@ import logging import subprocess # local -from ._subcommand import SubCommand - -# parent +from ..subcommand import SubCommand from ..config import LoadedConfig from ..executable import Executable from ..misc import are_you_sure diff --git a/src/kiwi/subcommands/new.py b/src/kiwi/subcommands/new.py index 9571ebe..cfac9b1 100644 --- a/src/kiwi/subcommands/new.py +++ b/src/kiwi/subcommands/new.py @@ -4,10 +4,8 @@ import os import shutil # local -from ._subcommand import ProjectCommand - -# parent from .._constants import DEFAULT_DOCKER_COMPOSE_NAME +from ..subcommand import ProjectCommand class NewCommand(ProjectCommand): diff --git a/src/kiwi/subcommands/pull.py b/src/kiwi/subcommands/pull.py index a54144f..a1ed790 100644 --- a/src/kiwi/subcommands/pull.py +++ b/src/kiwi/subcommands/pull.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand class PullCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/push.py b/src/kiwi/subcommands/push.py index 48c3ab2..0f83c52 100644 --- a/src/kiwi/subcommands/push.py +++ b/src/kiwi/subcommands/push.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand class PushCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/sh.py b/src/kiwi/subcommands/sh.py index 08a41b1..c8ef46e 100644 --- a/src/kiwi/subcommands/sh.py +++ b/src/kiwi/subcommands/sh.py @@ -3,9 +3,7 @@ import logging import subprocess # local -from ._subcommand import ServiceCommand - -# parent +from ..subcommand import ServiceCommand from ..config import LoadedConfig diff --git a/src/kiwi/subcommands/show.py b/src/kiwi/subcommands/show.py index 1aed901..8b47e75 100644 --- a/src/kiwi/subcommands/show.py +++ b/src/kiwi/subcommands/show.py @@ -1,7 +1,5 @@ # local -from ._subcommand import SubCommand - -# parent +from ..subcommand import SubCommand from ..config import LoadedConfig diff --git a/src/kiwi/subcommands/up.py b/src/kiwi/subcommands/up.py index f28e310..b369545 100644 --- a/src/kiwi/subcommands/up.py +++ b/src/kiwi/subcommands/up.py @@ -1,5 +1,5 @@ # local -from ._subcommand import ServiceCommand +from ..subcommand import ServiceCommand class UpCommand(ServiceCommand): diff --git a/src/kiwi/subcommands/update.py b/src/kiwi/subcommands/update.py index 5335e37..0440cdc 100644 --- a/src/kiwi/subcommands/update.py +++ b/src/kiwi/subcommands/update.py @@ -1,7 +1,5 @@ # local -from ._subcommand import ServiceCommand - -# parent +from ..subcommand import ServiceCommand from ..misc import are_you_sure