Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
u"tag:yaml.org,2002:omap", SafeConstructor.construct_yaml_omap
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", SafeConstructor.construct_yaml_pairs
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:set", SafeConstructor.construct_yaml_set
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:str", SafeConstructor.construct_yaml_str
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:seq", SafeConstructor.construct_yaml_seq
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:map", SafeConstructor.construct_yaml_map
)
SafeConstructor.add_constructor(None, SafeConstructor.construct_undefined)
if PY2:
class classobj:
pass
class Constructor(SafeConstructor):
u"tag:yaml.org,2002:timestamp", SafeConstructor.construct_yaml_timestamp
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:omap", SafeConstructor.construct_yaml_omap
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", SafeConstructor.construct_yaml_pairs
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:set", SafeConstructor.construct_yaml_set
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:str", SafeConstructor.construct_yaml_str
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:seq", SafeConstructor.construct_yaml_seq
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:map", SafeConstructor.construct_yaml_map
)
SafeConstructor.add_constructor(None, SafeConstructor.construct_undefined)
if PY2:
class classobj:
u"tag:yaml.org,2002:pairs", SafeConstructor.construct_yaml_pairs
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:set", SafeConstructor.construct_yaml_set
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:str", SafeConstructor.construct_yaml_str
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:seq", SafeConstructor.construct_yaml_seq
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:map", SafeConstructor.construct_yaml_map
)
SafeConstructor.add_constructor(None, SafeConstructor.construct_undefined)
if PY2:
class classobj:
pass
class Constructor(SafeConstructor):
def construct_python_str(self, node):
raise ValueError("Unsafe constructor not implemented in this library")
def construct_python_unicode(self, node):
None,
None,
"could not determine a constructor for the tag %r" % utf8(node.tag),
node.start_mark,
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:null", SafeConstructor.construct_yaml_null
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:bool", SafeConstructor.construct_yaml_bool
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:binary", SafeConstructor.construct_yaml_binary
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", SafeConstructor.construct_yaml_timestamp
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:null", SafeConstructor.construct_yaml_null
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:bool", SafeConstructor.construct_yaml_bool
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:binary", SafeConstructor.construct_yaml_binary
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", SafeConstructor.construct_yaml_timestamp
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:omap", SafeConstructor.construct_yaml_omap
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", SafeConstructor.construct_yaml_pairs
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:binary", SafeConstructor.construct_yaml_binary
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", SafeConstructor.construct_yaml_timestamp
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:omap", SafeConstructor.construct_yaml_omap
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", SafeConstructor.construct_yaml_pairs
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:set", SafeConstructor.construct_yaml_set
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:str", SafeConstructor.construct_yaml_str
)
SafeConstructor.add_constructor(
data.__setstate__(state)
else:
state = self.construct_mapping(node)
data.__dict__.update(state)
def construct_undefined(self, node):
# type: (Any) -> None
raise ConstructorError(
None,
None,
"could not determine a constructor for the tag %r" % utf8(node.tag),
node.start_mark,
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:null", SafeConstructor.construct_yaml_null
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:bool", SafeConstructor.construct_yaml_bool
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
def construct_undefined(self, node):
# type: (Any) -> None
raise ConstructorError(
None,
None,
"could not determine a constructor for the tag %r" % utf8(node.tag),
node.start_mark,
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:null", SafeConstructor.construct_yaml_null
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:bool", SafeConstructor.construct_yaml_bool
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:binary", SafeConstructor.construct_yaml_binary
)
SafeConstructor.add_constructor(
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:null", SafeConstructor.construct_yaml_null
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:bool", SafeConstructor.construct_yaml_bool
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:int", SafeConstructor.construct_yaml_int
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:float", SafeConstructor.construct_yaml_float
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:binary", SafeConstructor.construct_yaml_binary
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", SafeConstructor.construct_yaml_timestamp
)
SafeConstructor.add_constructor(
u"tag:yaml.org,2002:omap", SafeConstructor.construct_yaml_omap
)
SafeConstructor.add_constructor(