o
    4ήc                     @   s,   d Z ddlmZ dd Zdd Zdd Zd	S )
z,
Commonly useful filters for `attr.asdict`.
   )	Attributec                 C   s$   t dd | D t dd | D fS )zD
    Returns a tuple of `frozenset`s of classes and attributes.
    c                 s       | ]
}t |tr|V  qd S N)
isinstancetype.0cls r
   3/tmp/pip-target-vg8gfxp4/lib/python/attr/filters.py	<genexpr>       z_split_what.<locals>.<genexpr>c                 s   r   r   )r   r   r   r
   r
   r   r      r   )	frozenset)whatr
   r
   r   _split_what
   s   r   c                        t | \  fdd}|S )z
    Include *what*.

    :param what: What to include.
    :type what: `list` of `type` or `attrs.Attribute`\ s

    :rtype: `callable`
    c                    s   |j v p|  v S r   	__class__	attributevalueattrsr	   r
   r   include_      zinclude.<locals>.include_r   )r   r   r
   r   r   include      	r   c                     r   )z
    Exclude *what*.

    :param what: What to exclude.
    :type what: `list` of classes or `attrs.Attribute`\ s.

    :rtype: `callable`
    c                    s   |j vo|  vS r   r   r   r   r
   r   exclude_0   r   zexclude.<locals>.exclude_r   )r   r   r
   r   r   exclude%   r   r   N)__doc___maker   r   r   r   r
   r
   r
   r   <module>   s
   
