# Path: syncano_cli/base/options.py
# class BottomSpacedOpt(OptionsBase):
#     OPTIONS = ['space_bottom']
# 
#     def __init__(self, space_bottom=True, **kwargs):
#         super(BottomSpacedOpt, self).__init__(space_bottom=space_bottom, **kwargs)
# 
# class ColorSchema(object):
#     INFO = 'green'
#     PROMPT = 'cyan'
#     WARNING = 'yellow'
#     ERROR = 'red'
# 
# class DefaultOpt(OptionsBase):
#     color = ColorSchema.INFO
#     indent = 1
#     space_top = False
#     space_bottom = False
# 
# class OptionsBase(object):
#     CLICK_MAP = {
#         'color': 'fg'
#     }
# 
#     OPTIONS = ['color', 'indent', 'space_top', 'space_bottom']
# 
#     def __init__(
#             self,
#             color=ColorSchema.INFO,
#             indent=1,
#             space_top=False,
#             space_bottom=False):
#         """Allows to override class attributes."""
#         self.color = color
#         self.indent = indent
#         self.space_top = space_top
#         self.space_bottom = space_bottom
# 
#     def map_click(self):
#         return {click_name: getattr(self, option_name) for option_name, click_name in six.iteritems(self.CLICK_MAP)}
# 
#     def get_options(self):
#         return {
#             key: value for key, value in six.iteritems(self.__dict__) if key in self.OPTIONS
#         }
# 
#     @classmethod
#     def build_options(cls, option_list):
#         options = {}
#         for option in option_list:
#             options.update(option.get_options())
#         return cls(**options)
# 
# class WarningOpt(OptionsBase):
#     OPTIONS = ['color']
# 
#     def __init__(self, color=ColorSchema.WARNING, **kwargs):
#         super(WarningOpt, self).__init__(color=color, **kwargs)


import click
import six
from syncano_cli.base.options import BottomSpacedOpt, ColorSchema, DefaultOpt, OptionsBase, WarningOpt

    indent = '    '
    not_set = '-- not set --'

    def write(self, single_line, *options):
        option = self.get_options(options)
        styles = option.map_click()
        single_line = self._indent(single_line, option)
        self._write(single_line, option, **styles)

    def write_lines(self, lines, *options):
        lines = lines.splitlines() if isinstance(lines, six.string_types) else lines
        for line in lines:
            self.write(line, *options)

    def write_block(self, lines, *options):
        self.write_lines(lines, *options)
        self.separator()

    @classmethod
    def empty_line(cls):
        click.echo()

    def separator(self, size=70, indent=1):
        self.write(size * '-', DefaultOpt(indent=indent), WarningOpt(), BottomSpacedOpt())

    def display_config(self, config):
        for name, value in six.iteritems(config):
            self.write('{}{:20} {}'.format(
                self.indent,

# Path: syncano_cli/base/options.py
# class BottomSpacedOpt(OptionsBase):
#     OPTIONS = ['space_bottom']
# 
#     def __init__(self, space_bottom=True, **kwargs):
#         super(BottomSpacedOpt, self).__init__(space_bottom=space_bottom, **kwargs)
# 
# class ColorSchema(object):
#     INFO = 'green'
#     PROMPT = 'cyan'
#     WARNING = 'yellow'
#     ERROR = 'red'
# 
# class DefaultOpt(OptionsBase):
#     color = ColorSchema.INFO
#     indent = 1
#     space_top = False
#     space_bottom = False
# 
# class OptionsBase(object):
#     CLICK_MAP = {
#         'color': 'fg'
#     }
# 
#     OPTIONS = ['color', 'indent', 'space_top', 'space_bottom']
# 
#     def __init__(
#             self,
#             color=ColorSchema.INFO,
#             indent=1,
#             space_top=False,
#             space_bottom=False):
#         """Allows to override class attributes."""
#         self.color = color
#         self.indent = indent
#         self.space_top = space_top
#         self.space_bottom = space_bottom
# 
#     def map_click(self):
#         return {click_name: getattr(self, option_name) for option_name, click_name in six.iteritems(self.CLICK_MAP)}
# 
#     def get_options(self):
#         return {
#             key: value for key, value in six.iteritems(self.__dict__) if key in self.OPTIONS
#         }
# 
#     @classmethod
#     def build_options(cls, option_list):
#         options = {}
#         for option in option_list:
#             options.update(option.get_options())
#         return cls(**options)
# 
# class WarningOpt(OptionsBase):
#     OPTIONS = ['color']
# 
#     def __init__(self, color=ColorSchema.WARNING, **kwargs):
#         super(WarningOpt, self).__init__(color=color, **kwargs)


# Path: syncano_cli/base/formatters.py
import click
import six
from syncano_cli.base.options import BottomSpacedOpt, ColorSchema, DefaultOpt, OptionsBase, WarningOpt


    indent = '    '
    not_set = '-- not set --'

    def write(self, single_line, *options):
        option = self.get_options(options)
        styles = option.map_click()
        single_line = self._indent(single_line, option)
        self._write(single_line, option, **styles)

    def write_lines(self, lines, *options):
        lines = lines.splitlines() if isinstance(lines, six.string_types) else lines
        for line in lines:
            self.write(line, *options)

    def write_block(self, lines, *options):
        self.write_lines(lines, *options)
        self.separator()

    @classmethod
    def empty_line(cls):
        click.echo()

    def separator(self, size=70, indent=1):
        self.write(size * '-', DefaultOpt(indent=indent), WarningOpt(), BottomSpacedOpt())

    def display_config(self, config):
        for name, value in six.iteritems(config):
            self.write('{}{:20} {}'.format(
                self.indent,

                click.style(name, fg=ColorSchema.PROMPT),