# Path: cliff/columns.py
# class FormattableColumn(object, metaclass=abc.ABCMeta):
#     def __init__(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def human_readable(self):
#     def machine_readable(self):


import yaml
from . import base
from cliff import columns
#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#  License for the specific language governing permissions and limitations
#  under the License.

"""Output formatters using PyYAML.
"""




class YAMLFormatter(base.ListFormatter, base.SingleFormatter):

    def add_argument_group(self, parser):
        pass

    def emit_list(self, column_names, data, stdout, parsed_args):
        items = []
        for item in data:
            items.append(
                {n: (i.machine_readable()
                     if isinstance(i, columns.FormattableColumn)
                     else i)
                 for n, i in zip(column_names, item)}
            )
        yaml.safe_dump(items, stream=stdout, default_flow_style=False)

    def emit_one(self, column_names, data, stdout, parsed_args):
        for key, value in zip(column_names, data):
            dict_data = {
                key: (value.machine_readable()

# Path: cliff/columns.py
# class FormattableColumn(object, metaclass=abc.ABCMeta):
#     def __init__(self, value):
#     def __eq__(self, other):
#     def __lt__(self, other):
#     def human_readable(self):
#     def machine_readable(self):


# Path: cliff/formatters/yaml_format.py
import yaml
from . import base
from cliff import columns

#  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#  License for the specific language governing permissions and limitations
#  under the License.

"""Output formatters using PyYAML.
"""




class YAMLFormatter(base.ListFormatter, base.SingleFormatter):

    def add_argument_group(self, parser):
        pass

    def emit_list(self, column_names, data, stdout, parsed_args):
        items = []
        for item in data:
            items.append(
                {n: (i.machine_readable()
                     if isinstance(i, columns.FormattableColumn)
                     else i)
                 for n, i in zip(column_names, item)}
            )
        yaml.safe_dump(items, stream=stdout, default_flow_style=False)

    def emit_one(self, column_names, data, stdout, parsed_args):
        for key, value in zip(column_names, data):
            dict_data = {
                key: (value.machine_readable()

                      if isinstance(value, columns.FormattableColumn)