U aðfSã@sFdZddlmZddlmZdd„Zdd„Zdd „Zd d „Ze ƒZ d S) z% Commonly used hooks for on_setattr. é)Ú_config©ÚFrozenAttributeErrorcs‡fdd„}|S)zf Run all *setters* and return the return value of the last one. .. versionadded:: 20.1.0 cs|}ˆD]}||||ƒ}q|S)N©)ÚinstanceÚattribÚ new_valueÚrvÚsetter©Úsettersrú=/opt/nydus/tmp/pip-target-53d1vnqk/lib/python/attr/setters.pyÚ wrapped_pipeszpipe..wrapped_piper)r rrr r Úpipe s rcCs tƒ‚dS)zL Prevent an attribute to be modified. .. versionadded:: 20.1.0 Nr)Ú_Ú__Z___rrr ÚfrozensrcCs,tjdkr|S|j}|s|S||||ƒ|S)z^ Run *attrib*'s validator on *new_value* if it has one. .. versionadded:: 20.1.0 F)rZ_run_validatorsÚ validator)rrrÚvrrr Úvalidate&s  rcCs8|j}|r4ddlm}t||ƒs(||ƒS||||ƒS|S)z~ Run *attrib*'s converter -- if it has one -- on *new_value* and return the result. .. versionadded:: 20.1.0 r)Ú Converter)Ú converterÚ_makerÚ isinstance)rrrÚcrrrr Úconvert8s   rN) Ú__doc__ÚrÚ exceptionsrrrrrÚobjectZNO_OPrrrr Ús