File: //lib/python3/dist-packages/awscli/customizations/eks/__pycache__/ordered_yaml.cpython-310.pyc
o
.&�aH � @ s| d dl Z d dlmZ G dd� de j�ZG dd� de j�Zdd� Ze�e j j
je� d d
� Ze�
ee� dd� Zdd
d�ZdS )� N)�OrderedDictc @ � e Zd ZdZdS )�SafeOrderedLoaderz- Safely load a yaml file into an OrderedDict.N��__name__�
__module__�__qualname__�__doc__� r
r
�H/usr/lib/python3/dist-packages/awscli/customizations/eks/ordered_yaml.pyr � r c @ r )�SafeOrderedDumperz$ Safely dump an OrderedDict as yaml.Nr r
r
r
r r
r r
c C s | � |� t| �|��S �N)�flatten_mappingr �construct_pairs)�loader�noder
r
r �_ordered_constructor s
r c C s | � tjjj|�� �S r )�represent_mapping�yaml�resolver�BaseResolver�DEFAULT_MAPPING_TAG�items)�dumper�datar
r
r �_ordered_representer$ s �r c C s t �| t�S )z/ Load an OrderedDict object from a yaml stream.)r �loadr )�streamr
r
r �ordered_yaml_load- s r c C s t j| |tdd�S )z�
Dump an OrderedDict object to yaml.
:param to_dump: The OrderedDict to dump
:type to_dump: OrderedDict
:param stream: The file to dump to
If not given or if None, only return the value
:type stream: file
F)�default_flow_style)r �dumpr
)�to_dumpr r
r
r �ordered_yaml_dump2 s �r# r )r �botocore.compatr �
SafeLoaderr �
SafeDumperr
r �add_constructorr r r r �add_representerr r# r
r
r
r �<module> s
�