HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/yamldumper.cpython-310.pyc
o

;jD�@s�dZddlZddlmZddlZddlZddlmZzddlmZ	ddlm
ZWney9ddlm	Z	mZYnwgd�Z
Gd	d
�d
e	�ZGdd�de	�ZGd
d�de�ZGdd�dee�Zdd�Zdd�Ze�ee�e�ee�e�ee�e�ee�e�de�e�ejejjj�e�ejejjj�e�ejjjejjj�e�ejjjejjj�e�dej�e�dej�dd�Zddd�Zddd�ZdS)z6
    salt.utils.yamldumper
    ~~~~~~~~~~~~~~~~~~~~~

�N)�OrderedDict)�HashableOrderedDict)�CDumper)�CSafeDumper)�Dumper�
SafeDumper)�
OrderedDumper�SafeOrderedDumper�IndentedSafeOrderedDumper�
get_dumper�dump�	safe_dumpcs"eZdZdZd�fdd�	Z�ZS)�IndentMixinz�
    Mixin that improves YAML dumped list readability
    by indenting them by two spaces,
    instead of being flush with the key they are under.
    Fcst��|d�S)NF)�super�increase_indent)�selfZflowZ
indentless��	__class__��I/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/yamldumper.pyr+szIndentMixin.increase_indent)FF)�__name__�
__module__�__qualname__�__doc__r�
__classcell__rrrrr$src@�eZdZdZdS)rzN
    A YAML dumper that represents python OrderedDict as simple YAML map.
    N�rrrrrrrrr/�rc@r)r	zS
    A YAML safe dumper that represents python OrderedDict as simple YAML map.
    Nrrrrrr	5rr	c@r)r
z}
    A YAML safe dumper that represents python OrderedDict as simple YAML map,
    and also indents lists by two spaces.
    Nrrrrrr
;rr
cCs|�t|����S�N)�represent_dict�list�items�Zdumper�datarrr�represent_ordereddictBsr$cCs|�dd�S)Nztag:yaml.org,2002:nullZNULL)�represent_scalarr"rrr�represent_undefinedFsr&ztag:yaml.org,2002:timestampcCstttd��|�S)N)rr	r
)rr	r
�get)Zdumper_namerrrrgs��rcKs0d|vrd|d<|�dd�tj||fi|��S)z�
    .. versionadded:: 2018.3.0

    Helper that wraps yaml.dump and ensures that we encode unicode strings
    unless explicitly told not to.
    �
allow_unicodeT�default_flow_styleN)�
setdefault�yamlr�r#�stream�kwargsrrrrosrcKs4d|vrd|d<|�dd�tj||fdti|��S)z�
    Use a custom dumper to ensure that defaultdict and OrderedDict are
    represented properly. Ensure that unicode strings are encoded unless
    explicitly told not to.
    r(Tr)Nr)r*r+rr	r,rrrr
|sr
r) r�collectionsrr+Zsalt.utils.context�saltZsalt.utils.datastructuresrrrrr�ImportError�__all__rrr	r
r$r&Zadd_representer�defaultdictZrepresenterZSafeRepresenterr�utils�contextZNamespacedDictWrapperr%rrr
rrrr�<module>s^
�
������