a
    �Ï?e3  ã                   @   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 library for YAML backend modules.é   )Úfilter_optionsé   )Úbasec                    s   t ‡ fdd„| ¡ D ƒ|ƒS )a
  Filter a key ``key`` in ``options.

    :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   ú`/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/anyconfig/backend/yaml/common.pyÚ
<listcomp>   ó    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   