# Path: openformats/formats/yaml/constants.py
# YAML_DICT_ID = u'tag:yaml.org,2002:map'
# 
# YAML_LIST_ID = u'tag:yaml.org,2002:seq'
# 
# YAML_STRING_ID = u'tag:yaml.org,2002:str'


import six
import yaml
from openformats.formats.yaml.constants import (YAML_DICT_ID, YAML_LIST_ID,
                                                YAML_STRING_ID)


def double_quoted_unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return dumper.represent_scalar(tag, data, style='"')


def single_quoted_unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return dumper.represent_scalar(tag, data, style="'")


def block_list_representer(dumper, data):
    return dumper.represent_sequence(YAML_LIST_ID, data, flow_style=False)


def flow_list_representer(dumper, data):
    return dumper.represent_sequence(YAML_LIST_ID, data, flow_style=True)


def ordered_dict_representer(dumper, data):
    return dumper.represent_dict(six.iteritems(data))


def block_style_ordered_dict_representer(dumper, data):
    return dumper.represent_mapping(YAML_DICT_ID, six.iteritems(data),
                                    flow_style=False)


def flow_style_ordered_dict_representer(dumper, data):

# Path: openformats/formats/yaml/constants.py
# YAML_DICT_ID = u'tag:yaml.org,2002:map'
# 
# YAML_LIST_ID = u'tag:yaml.org,2002:seq'
# 
# YAML_STRING_ID = u'tag:yaml.org,2002:str'


# Path: openformats/formats/yaml/yaml_representers.py
import six
import yaml
from openformats.formats.yaml.constants import (YAML_DICT_ID, YAML_LIST_ID,
                                                YAML_STRING_ID)



def double_quoted_unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return dumper.represent_scalar(tag, data, style='"')


def single_quoted_unicode_representer(dumper, data):
    tag = getattr(data, 'tag', YAML_STRING_ID)
    return dumper.represent_scalar(tag, data, style="'")


def block_list_representer(dumper, data):
    return dumper.represent_sequence(YAML_LIST_ID, data, flow_style=False)


def flow_list_representer(dumper, data):
    return dumper.represent_sequence(YAML_LIST_ID, data, flow_style=True)


def ordered_dict_representer(dumper, data):
    return dumper.represent_dict(six.iteritems(data))


def block_style_ordered_dict_representer(dumper, data):
    return dumper.represent_mapping(YAML_DICT_ID, six.iteritems(data),
                                    flow_style=False)


def flow_style_ordered_dict_representer(dumper, data):

    return dumper.represent_mapping(YAML_DICT_ID, six.iteritems(data),