File: //lib/python3/dist-packages/awscli/customizations/eks/__pycache__/ordered_yaml.cpython-38.pyc
U
<�^H � @ 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 @ s 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 s r c @ s e Zd ZdZdS )�SafeOrderedDumperz$ Safely dump an OrderedDict as yaml.Nr r r r r
r s r c C s | � |� t| �|��S �N)Zflatten_mappingr Zconstruct_pairs)�loaderZnoder r r
�_ordered_constructor s
r c C s | � tjjj|�� �S r )Zrepresent_mapping�yaml�resolver�BaseResolver�DEFAULT_MAPPING_TAG�items)Zdumper�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)Zdefault_flow_style)r �dumpr )Zto_dumpr r r r
�ordered_yaml_dump2 s �r )N)r Zbotocore.compatr Z
SafeLoaderr Z
SafeDumperr r Zadd_constructorr r r r Zadd_representerr r r r r r
�<module> s �