HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/yamldumper.cpython-310.pyc
o

�N�g$�@s�dZddlZddlZddlZddlmZmZzddlmZ	ddlm
ZWney5ddlm	Z	mZYnwgd�Z
Gdd	�d	e	�ZGd
d�de	�ZGdd
�d
e�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)�HashableOrderedDict�OrderedDict)�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	4rr	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_ordereddictAsr$cCs|�dd�S)Nztag:yaml.org,2002:nullZNULL)�represent_scalarr"rrr�represent_undefinedEsr&ztag:yaml.org,2002:timestampcCstttd��|�S)N)rr	r
)rr	r
�get)Zdumper_namerrrrfs��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ns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�collectionsr+Zsalt.utils.context�saltZsalt.utils.odictrrrrrr�ImportError�__all__rrr	r
r$r&Zadd_representer�defaultdictZrepresenterZSafeRepresenterr�utils�contextZNamespacedDictWrapperr%rrr
rrrr�<module>s\
�
������