1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +00:00

organized imports

This commit is contained in:
Jörn-Michael Miehe 2020-08-12 17:46:50 +02:00
parent 70b04f039a
commit 1bd547587b
13 changed files with 28 additions and 8 deletions

View file

@ -1,6 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# system
import logging import logging
# local
import kiwi import kiwi

View file

@ -1,3 +1,4 @@
# local
from .parser import Parser from .parser import Parser
from .runner import Runner from .runner import Runner

View file

@ -1,3 +1,4 @@
# system
import os import os
KIWI_ROOT = os.getenv('KIWI_ROOT', ".") KIWI_ROOT = os.getenv('KIWI_ROOT', ".")

View file

@ -1,9 +1,11 @@
# system
import copy import copy
import logging import logging
import re
import os import os
import re
import yaml import yaml
# local
from ._constants import KIWI_ROOT, KIWI_CONF_NAME from ._constants import KIWI_ROOT, KIWI_CONF_NAME
########### ###########

View file

@ -1,3 +1,4 @@
# system
import argparse import argparse

View file

@ -1,5 +1,7 @@
# system
import logging import logging
# local
from .config import LoadedConfig from .config import LoadedConfig
from .parser import Parser from .parser import Parser
from .subcommands import * from .subcommands import *

View file

@ -1,9 +1,10 @@
# local
from .init import InitCommand from .init import InitCommand
from .show import ShowCommand
from .logs import LogsCommand from .logs import LogsCommand
from .show import ShowCommand
__all__ = [ __all__ = [
'InitCommand', 'InitCommand',
'ShowCommand', 'LogsCommand',
'LogsCommand' 'ShowCommand'
] ]

View file

@ -1,3 +1,4 @@
# parent
from ..parser import Parser from ..parser import Parser
@ -14,5 +15,3 @@ class SubCommand:
def run(self, config, args): def run(self, config, args):
pass pass

View file

@ -1,9 +1,11 @@
# system
import logging import logging
import os import os
# parent (display purposes only)
from .._constants import KIWI_CONF_NAME from .._constants import KIWI_CONF_NAME
from ..config import DefaultConfig
# local
from ._subcommand import SubCommand from ._subcommand import SubCommand
@ -37,6 +39,8 @@ class InitCommand(SubCommand):
logging.info(f"Initializing kiwi-config instance in '{os.getcwd()}'") logging.info(f"Initializing kiwi-config instance in '{os.getcwd()}'")
if args.force and os.path.isfile(KIWI_CONF_NAME): if args.force and os.path.isfile(KIWI_CONF_NAME):
from ..config import DefaultConfig
logging.warning(f"Overwriting existing '{KIWI_CONF_NAME}'!") logging.warning(f"Overwriting existing '{KIWI_CONF_NAME}'!")
config = DefaultConfig.get() config = DefaultConfig.get()

View file

@ -1,5 +1,7 @@
# system
import logging import logging
# local
from ._subcommand import SubCommand from ._subcommand import SubCommand
from .utils.dockercommand import DockerCommand from .utils.dockercommand import DockerCommand

View file

@ -1,3 +1,4 @@
# local
from ._subcommand import SubCommand from ._subcommand import SubCommand

View file

@ -1,5 +1,7 @@
# system
import subprocess import subprocess
# local
from .executable import Executable from .executable import Executable

View file

@ -1,5 +1,6 @@
import os # system
import logging import logging
import os
import subprocess import subprocess