How to use the srsly.ruamel_yaml.constructor.Constructor.add_constructor function in srsly

To help you get started, we’ve selected a few srsly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/complex", Constructor.construct_python_complex
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/list", Constructor.construct_yaml_seq
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/tuple", Constructor.construct_python_tuple
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/dict", Constructor.construct_yaml_map
)

Constructor.add_multi_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/complex", Constructor.construct_python_complex
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/list", Constructor.construct_yaml_seq
)

Constructor.add_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/complex", Constructor.construct_python_complex
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/list", Constructor.construct_yaml_seq
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/tuple", Constructor.construct_python_tuple
)

Constructor.add_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
def construct_python_object_apply(self, suffix, node, newobj=False):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object_new(self, suffix, node):
        raise ValueError("Unsafe constructor not implemented in this library")


Constructor.add_constructor(
    u"tag:yaml.org,2002:python/none", Constructor.construct_yaml_null
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/bool", Constructor.construct_yaml_bool
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/str", Constructor.construct_python_str
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/complex", Constructor.construct_python_complex
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/list", Constructor.construct_yaml_seq
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/tuple", Constructor.construct_python_tuple
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/dict", Constructor.construct_yaml_map
)

Constructor.add_multi_constructor(
    u"tag:yaml.org,2002:python/name:", Constructor.construct_python_name
)

Constructor.add_multi_constructor(
    u"tag:yaml.org,2002:python/module:", Constructor.construct_python_module
)

Constructor.add_multi_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
raise ValueError("Unsafe constructor not implemented in this library")

    def set_python_instance_state(self, instance, state):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object(self, suffix, node):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object_apply(self, suffix, node, newobj=False):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object_new(self, suffix, node):
        raise ValueError("Unsafe constructor not implemented in this library")


Constructor.add_constructor(
    u"tag:yaml.org,2002:python/none", Constructor.construct_yaml_null
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/bool", Constructor.construct_yaml_bool
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/str", Constructor.construct_python_str
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/bool", Constructor.construct_yaml_bool
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/str", Constructor.construct_python_str
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
def construct_python_object(self, suffix, node):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object_apply(self, suffix, node, newobj=False):
        raise ValueError("Unsafe constructor not implemented in this library")

    def construct_python_object_new(self, suffix, node):
        raise ValueError("Unsafe constructor not implemented in this library")


Constructor.add_constructor(
    u"tag:yaml.org,2002:python/none", Constructor.construct_yaml_null
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/bool", Constructor.construct_yaml_bool
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/str", Constructor.construct_python_str
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/float", Constructor.construct_yaml_float
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/complex", Constructor.construct_python_complex
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/list", Constructor.construct_yaml_seq
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/tuple", Constructor.construct_python_tuple
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/dict", Constructor.construct_yaml_map
)

Constructor.add_multi_constructor(
    u"tag:yaml.org,2002:python/name:", Constructor.construct_python_name
)

Constructor.add_multi_constructor(
github explosion / srsly / srsly / ruamel_yaml / constructor.py View on Github external
raise ValueError("Unsafe constructor not implemented in this library")


Constructor.add_constructor(
    u"tag:yaml.org,2002:python/none", Constructor.construct_yaml_null
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/bool", Constructor.construct_yaml_bool
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/str", Constructor.construct_python_str
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/unicode", Constructor.construct_python_unicode
)

if PY3:
    Constructor.add_constructor(
        u"tag:yaml.org,2002:python/bytes", Constructor.construct_python_bytes
    )

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/int", Constructor.construct_yaml_int
)

Constructor.add_constructor(
    u"tag:yaml.org,2002:python/long", Constructor.construct_python_long
)