Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:bool", RoundTripConstructor.construct_yaml_bool
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:int", RoundTripConstructor.construct_yaml_int
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", RoundTripConstructor.construct_yaml_timestamp
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:omap", RoundTripConstructor.construct_yaml_omap
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", RoundTripConstructor.construct_yaml_pairs
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:set", RoundTripConstructor.construct_yaml_set
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:set", RoundTripConstructor.construct_yaml_set
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:str", RoundTripConstructor.construct_yaml_str
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:seq", RoundTripConstructor.construct_yaml_seq
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:map", RoundTripConstructor.construct_yaml_map
)
RoundTripConstructor.add_constructor(None, RoundTripConstructor.construct_undefined)
b = SafeConstructor.construct_yaml_bool(self, node)
if node.anchor:
return ScalarBoolean(b, anchor=node.anchor)
return b
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:null", RoundTripConstructor.construct_yaml_null
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:bool", RoundTripConstructor.construct_yaml_bool
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:int", RoundTripConstructor.construct_yaml_int
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", RoundTripConstructor.construct_yaml_timestamp
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:omap", RoundTripConstructor.construct_yaml_omap
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", RoundTripConstructor.construct_yaml_pairs
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:set", RoundTripConstructor.construct_yaml_set
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:str", RoundTripConstructor.construct_yaml_str
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:seq", RoundTripConstructor.construct_yaml_seq
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:map", RoundTripConstructor.construct_yaml_map
)
RoundTripConstructor.add_constructor(None, RoundTripConstructor.construct_undefined)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:null", RoundTripConstructor.construct_yaml_null
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:bool", RoundTripConstructor.construct_yaml_bool
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:int", RoundTripConstructor.construct_yaml_int
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", RoundTripConstructor.construct_yaml_timestamp
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:omap", RoundTripConstructor.construct_yaml_omap
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", RoundTripConstructor.construct_yaml_pairs
Composer.__init__(self, loader=self)
SafeConstructor.__init__(self, loader=self)
VersionedResolver.__init__(self, version, loader=self)
class Loader(Reader, Scanner, Parser, Composer, Constructor, VersionedResolver):
def __init__(self, stream, version=None, preserve_quotes=None):
raise ValueError("Unsafe loader not implemented in this library.")
class RoundTripLoader(
Reader,
RoundTripScanner,
RoundTripParser,
Composer,
RoundTripConstructor,
VersionedResolver,
):
def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
# self.reader = Reader.__init__(self, stream)
Reader.__init__(self, stream, loader=self)
RoundTripScanner.__init__(self, loader=self)
RoundTripParser.__init__(self, loader=self)
Composer.__init__(self, loader=self)
RoundTripConstructor.__init__(
self, preserve_quotes=preserve_quotes, loader=self
)
VersionedResolver.__init__(self, version, loader=self)
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:int", RoundTripConstructor.construct_yaml_int
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", RoundTripConstructor.construct_yaml_timestamp
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:omap", RoundTripConstructor.construct_yaml_omap
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", RoundTripConstructor.construct_yaml_pairs
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:set", RoundTripConstructor.construct_yaml_set
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:str", RoundTripConstructor.construct_yaml_str
data._yaml["tz"] = values["tz"]
if values["t"]:
data._yaml["t"] = True
return data
def construct_yaml_bool(self, node):
# type: (Any) -> Any
b = SafeConstructor.construct_yaml_bool(self, node)
if node.anchor:
return ScalarBoolean(b, anchor=node.anchor)
return b
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:null", RoundTripConstructor.construct_yaml_null
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:bool", RoundTripConstructor.construct_yaml_bool
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:int", RoundTripConstructor.construct_yaml_int
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:float", RoundTripConstructor.construct_yaml_float
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:binary", RoundTripConstructor.construct_yaml_binary
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:timestamp", RoundTripConstructor.construct_yaml_timestamp
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:omap", RoundTripConstructor.construct_yaml_omap
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:pairs", RoundTripConstructor.construct_yaml_pairs
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:set", RoundTripConstructor.construct_yaml_set
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:str", RoundTripConstructor.construct_yaml_str
)
RoundTripConstructor.add_constructor(
u"tag:yaml.org,2002:seq", RoundTripConstructor.construct_yaml_seq