a Kf0@sddlTddlTddlTddlTddlTddlTdZzddlTdZWne yZdZYn0ddl Z d@ddZ e fd d Z e fd d Ze fd dZe fddZddZddZddZddZddZddZddZdd Zdedddddfd!d"Zdeddddddddddf d#d$Zdefd%d&Zdedddddddddddddfd'd(Zdefd)d*ZdAd+d,ZdBd-d.Z ddefd/d0Z!ddefd1d2Z"dCd3d4Z#dDd5d6Z$efd7d8Z%efd9d:Z&Gd;d<dd>e(d?Z)dS)E)*z6.0TFNcCs|dur iSdS)N)settingsrrq/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/yaml/__init__.pywarningssrccs8||}z |r|Vq W|n |0dS)z9 Scan a YAML stream and produce scanning tokens. N) check_token get_tokendisposestreamLoaderloaderrrrscans rccs8||}z |r|Vq W|n |0dS)z9 Parse a YAML stream and produce parsing events. N) check_event get_eventr r rrrparse(s rcCs*||}z|W|S|0dS)zj Parse the first YAML document in a stream and produce the corresponding representation tree. N)get_single_noder r rrrcompose3s rccs8||}z |r|Vq W|n |0dS)zb Parse all YAML documents in a stream and produce corresponding representation trees. N) check_nodeget_noder r rrr compose_all>s rcCs*||}z|W|S|0dS)zd Parse the first YAML document in a stream and produce the corresponding Python object. N)get_single_datar r rrrloadJs rccs8||}z |r|Vq W|n |0dS)z\ Parse all YAML documents in a stream and produce corresponding Python objects. N) check_dataget_datar r rrrload_allUs rcCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve all tags except those known to be unsafe on untrusted input. )r FullLoaderr rrr full_loadasrcCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve all tags except those known to be unsafe on untrusted input. )rrrrrr full_load_allksr cCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve only basic YAML tags. This is known to be safe for untrusted input. )r SafeLoaderrrrr safe_loadusr"cCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve only basic YAML tags. This is known to be safe for untrusted input. )rr!rrrr safe_load_allsr#cCs t|tS)z Parse the first YAML document in a stream and produce the corresponding Python object. Resolve all tags, even those known to be unsafe on untrusted input. )r UnsafeLoaderrrrr unsafe_loadsr%cCs t|tS)z Parse all YAML documents in a stream and produce corresponding Python objects. Resolve all tags, even those known to be unsafe on untrusted input. )rr$rrrrunsafe_load_allsr&c Cshd}|durt}|j}|||||||d} z |D]} | | q4W| n | 0|rd|SdS)zl Emit YAML parsing events into a stream. If stream is None, return the produced string instead. N) canonicalindentwidth allow_unicode line_break)ioStringIOgetvalueemitr ) eventsr Dumperr'r(r)r*r+r.dumpereventrrrr/s r/c  Csd} |dur,|durt}nt}|j} ||||||||| | | | d }z0||D]}||qX|W|n |0| r| SdS)z Serialize a sequence of representation trees into a YAML stream. If stream is None, return the produced string instead. N) r'r(r)r*r+encodingversiontagsexplicit_start explicit_end)r,r-BytesIOr.open serializecloser )nodesr r1r'r(r)r*r+r4r7r8r5r6r.r2noderrr serialize_alls&     r?cKst|g|fd|i|S)zx Serialize a representation tree into a YAML stream. If stream is None, return the produced string instead. r1)r?)r>r r1kwdsrrrr;sr;cCsd}|dur,| durt}nt}|j}||||||||| | | || | |d}z0||D]}||q^|W|n |0|r|SdS)z Serialize a sequence of Python objects into a YAML stream. If stream is None, return the produced string instead. N) default_styledefault_flow_styler'r(r)r*r+r4r5r6r7r8 sort_keys)r,r-r9r.r: representr<r ) documentsr r1rArBr'r(r)r*r+r4r7r8r5r6rCr.r2datarrrdump_alls*    rGcKst|g|fd|i|S)zr Serialize a Python object into a YAML stream. If stream is None, return the produced string instead. r1)rG)rFr r1r@rrrdumpsrHcKst||fdti|S)z Serialize a sequence of Python objects into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. r1rG SafeDumper)rEr r@rrr safe_dump_allsrKcKst|g|fdti|S)z Serialize a Python object into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. r1rI)rFr r@rrr safe_dumpsrLcCsZ|dur:tj|||tj|||tj|||n||||||||dS)z Add an implicit scalar detector. If an implicit scalar value matches the given regexp, the corresponding tag is assigned to the scalar. first is a sequence of possible initial characters or None. N)rr add_implicit_resolverrr$)tagregexpfirstr r1rrrrMs rMcCsZ|dur:tj|||tj|||tj|||n||||||||dS)z Add a path based resolver for the given tag. A path is a list of keys that forms a path to a node in the representation tree. Keys can be string values, integers, or None. N)rr add_path_resolverrr$)rNpathkindr r1rrrrQs rQcCsD|dur4tj||tj||tj||n |||dS)z Add a constructor for the given tag. Constructor is a function that accepts a Loader instance and a node object and produces the corresponding Python object. N)rr add_constructorrr$)rN constructorr rrrrT.s rTcCsD|dur4tj||tj||tj||n |||dS)a  Add a multi-constructor for the given tag prefix. Multi-constructor is called for a node if its tag starts with tag_prefix. Multi-constructor accepts a Loader instance, a tag suffix, and a node object and produces the corresponding Python object. N)rr add_multi_constructorrr$) tag_prefixmulti_constructorr rrrrV;s rVcCs|||dS)z Add a representer for the given type. Representer is a function accepting a Dumper instance and an instance of the given data type and producing the corresponding representation node. N)add_representer) data_type representerr1rrrrYIsrYcCs|||dS)z Add a representer for the given type. Multi-representer is a function accepting a Dumper instance and an instance of the given data type or subtype and producing the corresponding representation node. N)add_multi_representer)rZmulti_representerr1rrrr\Rsr\cs eZdZdZfddZZS)YAMLObjectMetaclassz' The metaclass for YAMLObject. csxtt||||d|vrt|ddurtt|jtrR|jD]}||j|jq:n|j|j|j|j ||j dS)Nyaml_tag) superr^__init__ isinstance yaml_loaderlistrTr_ from_yaml yaml_dumperrYto_yaml)clsnamebasesr@r __class__rrra_s  zYAMLObjectMetaclass.__init__)__name__ __module__ __qualname____doc__ra __classcell__rrrkrr^[sr^c@sBeZdZdZdZeeegZe Z dZ dZ e ddZe ddZdS) YAMLObjectza An object that can dump itself to a YAML stream and load itself from a YAML stream. rNcCs |||S)zC Convert a representation node to a Python object. )construct_yaml_object)rhrr>rrrrexszYAMLObject.from_yamlcCs|j|j|||jdS)zC Convert a Python object to a representation node. ) flow_style)represent_yaml_objectr_yaml_flow_style)rhr2rFrrrrgs zYAMLObject.to_yaml)rmrnrorp __slots__r rr$rcr1rfr_rv classmethodrergrrrrrrjs  rr) metaclass)N)N)N)N)N)*errortokensr0r=rr2 __version__cyaml__with_libyaml__ ImportErrorr,rr rrrrrrrr r"r#r%r&r1r/r?r;rGrHrKrLrMrQrTrVrYr\typer^rrrrrrsp               !