
    ex                     F    d Z ddlmZ ddlmZ d Zd Zd Zd Z e	       Z
y)	z%
Commonly used hooks for on_setattr.
   )_configFrozenAttributeErrorc                        fd}|S )zf
    Run all *setters* and return the return value of the last one.

    .. versionadded:: 20.1.0
    c                 .    |}D ]  } || ||      } |S )N )instanceattrib	new_valuervsettersetterss        ./usr/lib/python3/dist-packages/attr/setters.pywrapped_pipezpipe.<locals>.wrapped_pipe   s,     	.F&"-B	. 	    r   )r   r   s   ` r   piper      s     r   c                     t               )zL
    Prevent an attribute to be modified.

    .. versionadded:: 20.1.0
    r   )______s      r   frozenr      s     
  r   c                 b    t         j                  du r|S |j                  }|s|S  || ||       |S )z^
    Run *attrib*'s validator on *new_value* if it has one.

    .. versionadded:: 20.1.0
    F)r   _run_validators	validator)r	   r
   r   vs       r   validater   '   s>     %'Ah	"r   c                 2    |j                   }|r ||      S |S )z
    Run *attrib*'s converter -- if it has one --  on *new_value* and return the
    result.

    .. versionadded:: 20.1.0
    )	converter)r	   r
   r   cs       r   convertr    9   s"     	A|r   N)__doc__ r   
exceptionsr   r   r   r   r    objectNO_OPr   r   r   <module>r&      s/   
  ,$!$  	r   