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
# system
import logging
# local
import kiwi

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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