B
    ÔùÓ`  ã               @   s:   d Z ddlmZ ddlmZ dd„ ZG dd„ dejƒZd	S )
z Common parts for YAML backends:
é   )Úfilter_optionsé   )Úbasec                s   t ‡ fdd„| ¡ D ƒ|ƒS )zç
    :param key: Key str in options
    :param options: Mapping object
    :return:
        New mapping object from 'options' in which the item with 'key' filtered

    >>> filter_from_options('a', dict(a=1, b=2))
    {'b': 2}
    c                s   g | ]}|ˆ kr|‘qS © r   )Ú.0Úk)Úkeyr   úA/tmp/pip-unpacked-wheel-bpftjxoo/anyconfig/backend/yaml/common.pyú
<listcomp>   s    z'filter_from_options.<locals>.<listcomp>)r   Úkeys)r   Úoptionsr   )r   r	   Úfilter_from_options   s    
r   c               @   s*   e Zd ZdZdZddgZdZdZdgZdS )ÚParserz 
    Parser for YAML files.
    ZyamlZymlTZac_dictN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú_typeZ_extensionsZ_orderedZ_allow_primitivesZ
_dict_optsr   r   r   r	   r      s   r   N)r   Úutilsr   Ú r   r   ZStreamParserr   r   r   r   r	   Ú<module>   s   