
    g                     &    S r SSKJr  S rS rS rg)zA
Commonly useful filters for `attrs.asdict` and `attrs.astuple`.
   )	Attributec                 l    [        S U  5       5      [        S U  5       5      [        S U  5       5      4$ )z<
Returns a tuple of `frozenset`s of classes and attributes.
c              3   T   #    U  H  n[        U[        5      (       d  M  Uv   M      g 7fN)
isinstancetype.0clss     ./usr/lib/python3/dist-packages/attr/filters.py	<genexpr>_split_what.<locals>.<genexpr>   s     ?#C)>##   (	(c              3   T   #    U  H  n[        U[        5      (       d  M  Uv   M      g 7fr   )r   strr	   s     r   r   r      s     >#C)=##r   c              3   T   #    U  H  n[        U[        5      (       d  M  Uv   M      g 7fr   )r   r   r	   s     r   r   r      s     D#C)C##r   )	frozenset)whats    r   _split_whatr   
   s8    
 	???>>>DDD     c                  :   ^^^ [        U 5      u  mmmUUU4S jnU$ )a_  
Create a filter that only allows *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to include. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.1.0 Accept strings with field names.
c                 f   > UR                   T;   =(       d    U R                  T;   =(       d    U T;   $ r   	__class__name	attributevalueattrsr   namess     r   include_include.<locals>.include_&   s2    OOs" "~~&"E!	
r   r   )r   r!   r   r   r    s     @@@r   includer$      "     $D)C
 Or   c                  :   ^^^ [        U 5      u  mmmUUU4S jnU$ )ap  
Create a filter that does **not** allow *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to exclude. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.3.0 Accept field name string as input argument
c                 p   > UR                   T;   =(       d    U R                  T;   =(       d    U T;   (       + $ r   r   r   s     r   exclude_exclude.<locals>.exclude_A   s7    OOs" "~~&"E!
 	
r   r#   )r   r(   r   r   r    s     @@@r   excluder*   0   r%   r   N)__doc___maker   r   r$   r*    r   r   <module>r.      s    6r   