ó
    ¬ægNN  ã                   ó0  • S r SSKrSSKrSSKJr  SSKJr  SSKJrJr  SSK	J
r
JrJrJr  SSKJr  SS	KJr  / S
QrS rS r\S 5       r\" SSSS9 " S S5      5       rS r\" SSSS9 " S S5      5       rS=S jr\" SSSS9 " S S5      5       rS r\" SSSS9 " S S5      5       rS r\" SSSS9 " S S5      5       rS  r\" SSSS9 " S! S"5      5       r S>S# jr!\" SSSS9 " S$ S%5      5       r"S>S& jr#\" SSSS9 " S' S(5      5       r$S) r%S* r&S+ r'S, r(\" SSSS9 " S- S.5      5       r)S/ r*\" SSSS9 " S0 S15      5       r+S2 r,\" SSSS9 " S3 S45      5       r-S5 r.\" SSSS9 " S6 S75      5       r/S\0\14S8.S9 jr2\" SSSS9 " S: S;5      5       r3S< r4g)?z
Commonly useful validators.
é    N)Úcontextmanager)ÚPatterné   )Úget_run_validatorsÚset_run_validators)Ú_AndValidatorÚand_ÚattribÚattrs)Údefault_if_none)ÚNotCallableError)r	   Údeep_iterableÚdeep_mappingÚdisabledÚgeÚget_disabledÚgtÚin_Úinstance_ofÚis_callableÚleÚltÚ
matches_reÚmax_lenÚmin_lenÚnot_ÚoptionalÚor_Úset_disabledc                 ó$   • [        U (       + 5        g)zá
Globally disable or enable running validators.

By default, they are run.

Args:
    disabled (bool): If `True`, disable running all validators.

.. warning::

    This function is not thread-safe!

.. versionadded:: 21.3.0
N©r   )r   s    Ú1/usr/lib/python3/dist-packages/attr/validators.pyr   r   *   s   € ô ˜8”|Õ$ó    c                  ó    • [        5       (       + $ )z¦
Return a bool indicating whether validators are currently disabled or not.

Returns:
    bool:`True` if validators are currently disabled.

.. versionadded:: 21.3.0
)r   © r#   r"   r   r   <   s   € ô "Ó#Ô#Ð#r#   c               #   ób   #   • [        S5         Sv •  [        S5        g! [        S5        f = f7f)zœ
Context manager that disables running validators within its context.

.. warning::

    This context manager is not thread-safe!

.. versionadded:: 21.3.0
FNTr!   r%   r#   r"   r   r   H   s(   é € ô �uÔð!Ûä˜4Õ øÔ˜4Õ üs   ‚/� “/Ÿ,¬/FT)ÚreprÚslotsÚunsafe_hashc                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_InstanceOfValidatoréZ   c           	      óÈ   • [        X0R                  5      (       dH  SUR                   SU R                  < SU< SUR                  < S3	n[	        UUU R                  U5      eg)ú@
We use a callable class to be able to change the ``__repr__``.
Ú'ú
' must be ú (got z that is a ú).N)Ú
isinstanceÚtypeÚnameÚ	__class__Ú	TypeError©ÚselfÚinstÚattrÚvalueÚmsgs        r"   Ú__call__Ú_InstanceOfValidator.__call__^   sf   € ô ˜%§¡×+Ñ+Ø�d—i‘i�[ 
¨4¯9©9©-°v¸e¹YÀkÐRW×RaÑRaÑQdÐdfÐgˆCÜØØØ—	‘	Øó	ð ð ,r#   c                 ó$   • SU R                   < S3$ )Nz <instance_of validator for type Ú>©r4   ©r9   s    r"   Ú__repr__Ú_InstanceOfValidator.__repr__k   ó   € Ø1°$·)±)±¸aÐ@Ð@r#   r%   N©	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r
   r4   r>   rD   Ú__static_attributes__r%   r#   r"   r+   r+   Z   ó   † á‹8€DòõAr#   r+   c                 ó   • [        U 5      $ )a°  
A validator that raises a `TypeError` if the initializer is called with a
wrong type for this particular attribute (checks are performed using
`isinstance` therefore it's also valid to pass a tuple of types).

Args:
    type (type | tuple[type]): The type to check for.

Raises:
    TypeError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected type, and the value it got.
)r+   rB   s    r"   r   r   o   ó   € ô   Ó%Ð%r#   )r'   Úfrozenr(   c                   ó<   • \ rS rSr\" 5       r\" 5       rS rS rSr	g)Ú_MatchesReValidatoré€   c                 ó¸   • U R                  U5      (       dD  SUR                   SU R                  R                  < SU< S3n[        UUU R                  U5      eg)r.   r/   z' must match regex z (z	 doesn't)N)Ú
match_funcr5   ÚpatternÚ
ValueErrorr8   s        r"   r>   Ú_MatchesReValidator.__call__…   s`   € ð �‰˜u×%Ñ%Ø�d—i‘i�[Ð 3°D·L±L×4HÑ4HÑ3KÈ2ÈeÉYÐV_Ð`ˆCÜØØØ—‘Øó	ð ð &r#   c                 ó$   • SU R                   < S3$ )Nz"<matches_re validator for pattern rA   )rV   rC   s    r"   rD   Ú_MatchesReValidator.__repr__’   s   € Ø3°D·L±LÑ3CÀ1ÐEÐEr#   r%   N)
rH   rI   rJ   rK   r
   rV   rU   r>   rD   rL   r%   r#   r"   rR   rR   €   s   † á‹h€GÙ“€JòõFr#   rR   c           
      ó&  • [         R                  S[         R                  [         R                  4nX#;  aD  SR	                  SR                  [        S [        U5       5       5      5      5      n[        U5      e[        U [        5      (       a  U(       a  Sn[        U5      eU nO[         R                  " X5      nU[         R                  L a  UR                  nO,U[         R                  L a  UR                  nOUR                  n[        XV5      $ )a¦  
A validator that raises `ValueError` if the initializer is called with a
string that doesn't match *regex*.

Args:
    regex (str, re.Pattern):
        A regex string or precompiled pattern to match against

    flags (int):
        Flags that will be passed to the underlying re function (default 0)

    func (typing.Callable):
        Which underlying `re` function to call. Valid options are
        `re.fullmatch`, `re.search`, and `re.match`; the default `None`
        means `re.fullmatch`. For performance reasons, the pattern is
        always precompiled using `re.compile`.

.. versionadded:: 19.2.0
.. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern.
Nz'func' must be one of {}.z, c              3   ó\   #   • U  H"  o=(       a    UR                   =(       d    S v •  M$     g7f)ÚNoneN)rH   )Ú.0Úes     r"   Ú	<genexpr>Úmatches_re.<locals>.<genexpr>¯   s!   é € ÐNÒ=M¸×(˜aŸj™j×3¨VÔ3Ò=Mùs   ‚*,zR'flags' can only be used with a string pattern; pass flags to re.compile() instead)ÚreÚ	fullmatchÚsearchÚmatchÚformatÚjoinÚsortedÚsetrW   r3   r   r7   ÚcompilerR   )ÚregexÚflagsÚfuncÚvalid_funcsr=   rV   rU   s          r"   r   r   –   sÑ   € ô* —<‘< ¤r§y¡y´"·(±(Ð;€KØÓØ)×0Ñ0Ø�I‰IÜÑN¼SÀÔ=MÓNÓNóó
ˆô
 ˜‹oÐä�%œ×!Ñ!ÞØfˆCÜ˜C“.Ð Ø‰ä—*’*˜UÓ*ˆàŒr�x‰xÒØ—]‘]‰
Ø	”—‘Ò	Ø—^‘^‰
à×&Ñ&ˆ
ä˜wÓ3Ð3r#   c                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_OptionalValidatoréÆ   c                 ó0   • Uc  g U R                  XU5        g ©N©Ú	validator©r9   r:   r;   r<   s       r"   r>   Ú_OptionalValidator.__call__Ê   s   € Ø‰=Øà�‰�t 5Õ)r#   c                 ó$   • SU R                   < S3$ )Nz<optional validator for z	 or None>rt   rC   s    r"   rD   Ú_OptionalValidator.__repr__Ð   s   € Ø)¨$¯.©.Ñ);¸9ÐEÐEr#   r%   N)	rH   rI   rJ   rK   r
   ru   r>   rD   rL   r%   r#   r"   rp   rp   Æ   s   † á“€Iò*õFr#   rp   c                 óv   • [        U [        [        45      (       a  [        [	        U 5      5      $ [        U 5      $ )aú  
A validator that makes an attribute optional.  An optional attribute is one
which can be set to `None` in addition to satisfying the requirements of
the sub-validator.

Args:
    validator
        (typing.Callable | tuple[typing.Callable] | list[typing.Callable]):
        A validator (or validators) that is used for non-`None` values.

.. versionadded:: 15.1.0
.. versionchanged:: 17.1.0 *validator* can be a list of validators.
.. versionchanged:: 23.1.0 *validator* can also be a tuple of validators.
)r3   ÚlistÚtuplerp   r   rt   s    r"   r   r   Ô   s0   € ô �)œd¤E˜]×+Ñ+Ü!¤-°	Ó":Ó;Ð;ä˜iÓ(Ð(r#   c                   ó:   • \ rS rSr\" 5       r\" SS9rS rS rSr	g)Ú_InValidatoréé   F)Úhashc                 óÈ   •  X0R                   ;   nU(       d:  SUR                   SU R                  < SU< S3n[	        UUU R                  U5      eg ! [         a    Sn NPf = f)NFr/   z' must be in r1   Ú))Úoptionsr7   r5   Ú_original_optionsrW   )r9   r:   r;   r<   Ú
in_optionsr=   s         r"   r>   Ú_InValidator.__call__î   sx   € ð	Ø§,¡,Ñ.ˆJö Ø�d—i‘i�[ ¨d×.DÑ.DÑ-GÀvÈeÉYÐVWÐXˆCÜØØØ×&Ñ&Øó	ð ð øô ó 	ØŠJð	ús   ‚A ÁA!Á A!c                 ó$   • SU R                   < S3$ )Nz<in_ validator with options rA   )r„   rC   s    r"   rD   Ú_InValidator.__repr__ý   s   € Ø-¨d×.DÑ.DÑ-GÀqÐIÐIr#   r%   N)
rH   rI   rJ   rK   r
   rƒ   r„   r>   rD   rL   r%   r#   r"   r~   r~   é   s   † á‹h€GÙ EÑ*ÐòõJr#   r~   c                 ór   • U n[        U [        [        [        45      (       a  [	        U 5      n [        X5      $ )a‚  
A validator that raises a `ValueError` if the initializer is called with a
value that does not belong in the *options* provided.

The check is performed using ``value in options``, so *options* has to
support that operation.

To keep the validator hashable, dicts, lists, and sets are transparently
transformed into a `tuple`.

Args:
    options: Allowed options.

Raises:
    ValueError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected options, and the value it got.

.. versionadded:: 17.1.0
.. versionchanged:: 22.1.0
   The ValueError was incomplete until now and only contained the human
   readable error message. Now it contains all the information that has
   been promised since 17.1.0.
.. versionchanged:: 24.1.0
   *options* that are a list, dict, or a set are now transformed into a
   tuple to keep the validator hashable.
)r3   r{   Údictri   r|   r~   )rƒ   Úrepr_optionss     r"   r   r     s1   € ð8 €LÜ�'œD¤$¬Ð,×-Ñ-Ü˜“.ˆä˜Ó.Ð.r#   c                   ó    • \ rS rSrS rS rSrg)Ú_IsCallableValidatori$  c                 ó€   • [        U5      (       d.  Sn[        UR                  UR                  X3R                  S9US9eg)r.   z?'{name}' must be callable (got {value!r} that is a {actual!r}).)r5   r<   Úactual)r=   r<   N)Úcallabler   rf   r5   r6   )r9   r:   r;   r<   Úmessages        r"   r>   Ú_IsCallableValidator.__call__&  sN   € ô ˜�‰ð8ð ô #Ø—N‘NØŸ™¨%¿¹ð #ð ð ñ	ð ð r#   c                 ó   • g)Nz<is_callable validator>r%   rC   s    r"   rD   Ú_IsCallableValidator.__repr__6  s   € Ø(r#   r%   N)rH   rI   rJ   rK   r>   rD   rL   r%   r#   r"   r�   r�   $  s   † òõ )r#   r�   c                  ó   • [        5       $ )ad  
A validator that raises a `attrs.exceptions.NotCallableError` if the
initializer is called with a value for this particular attribute that is
not callable.

.. versionadded:: 19.1.0

Raises:
    attrs.exceptions.NotCallableError:
        With a human readable error message containing the attribute
        (`attrs.Attribute`) name, and the value it got.
)r�   r%   r#   r"   r   r   :  s   € ô  Ó!Ð!r#   c                   óZ   • \ rS rSr\" \" 5       S9r\" S\" \" 5       5      S9rS r	S r
Srg)Ú_DeepIterableiJ  rt   N©Údefaultru   c                 óx   • U R                   b  U R                  XU5        U H  nU R                  XU5        M     g©r.   N©Úiterable_validatorÚmember_validator)r9   r:   r;   r<   Úmembers        r"   r>   Ú_DeepIterable.__call__Q  s:   € ð ×"Ñ"Ñ.Ø×#Ñ# D°Ô6ãˆFØ×!Ñ! $¨fÖ5ò r#   c                 óh   • U R                   c  SOSU R                   < 3nSU SU R                  < S3$ )NÚ Ú z<deep_iterable validator forz iterables of rA   rœ   )r9   Úiterable_identifiers     r"   rD   Ú_DeepIterable.__repr__[  sP   € ð ×&Ñ&Ñ.ñ à�T×,Ñ,Ñ/Ð0ð 	ð +Ð+>Ð*?Ø˜T×2Ñ2Ñ5°Qð8ð	
r#   r%   )rH   rI   rJ   rK   r
   r   rž   r   r�   r>   rD   rL   r%   r#   r"   r—   r—   J  s0   † á©«Ñ6ÐÙØ¡©«Ó 7ñÐò6õ	
r#   r—   c                 ó^   • [        U [        [        45      (       a  [        U 6 n [	        X5      $ )a  
A validator that performs deep validation of an iterable.

Args:
    member_validator: Validator to apply to iterable members.

    iterable_validator:
        Validator to apply to iterable itself (optional).

Raises
    TypeError: if any sub-validators fail

.. versionadded:: 19.1.0
)r3   r{   r|   r	   r—   ©rž   r�   s     r"   r   r   g  s.   € ô Ð"¤T¬5 M×2Ñ2ÜÐ!1Ð2ÐÜÐ)Ó>Ð>r#   c                   óp   • \ rS rSr\" \" 5       S9r\" \" 5       S9r\" S\" \" 5       5      S9r	S r
S rSrg)Ú_DeepMappingi{  rt   Nr˜   c                 ó    • U R                   b  U R                  XU5        U H)  nU R                  XU5        U R                  XX4   5        M+     gr›   )Úmapping_validatorÚkey_validatorÚvalue_validator)r9   r:   r;   r<   Úkeys        r"   r>   Ú_DeepMapping.__call__�  sL   € ð ×!Ñ!Ñ-Ø×"Ñ" 4¨uÔ5ãˆCØ×Ñ˜t¨3Ô/Ø× Ñ  ¨U©ZÖ8ò r#   c                 ó@   • SU R                   < SU R                  < S3$ )Nz,<deep_mapping validator for objects mapping z to rA   )r¬   r­   rC   s    r"   rD   Ú_DeepMapping.__repr__Œ  s(   € Ø=¸d×>PÑ>PÑ=SÐSWÐX\×XlÑXlÑWoÐopÐqÐqr#   r%   )rH   rI   rJ   rK   r
   r   r¬   r­   r   r«   r>   rD   rL   r%   r#   r"   r©   r©   {  s9   † á¡[£]Ñ3€MÙ¡{£}Ñ5€OÙ t±xÁÃÓ7NÑOÐò	9õrr#   r©   c                 ó   • [        XU5      $ )ag  
A validator that performs deep validation of a dictionary.

Args:
    key_validator: Validator to apply to dictionary keys.

    value_validator: Validator to apply to dictionary values.

    mapping_validator:
        Validator to apply to top-level mapping attribute (optional).

.. versionadded:: 19.1.0

Raises:
    TypeError: if any sub-validators fail
)r©   )r¬   r­   r«   s      r"   r   r   �  s   € ô" ˜Ð8IÓJÐJr#   c                   óJ   • \ rS rSr\" 5       r\" 5       r\" 5       rS rS r	Sr
g)Ú_NumberValidatori¤  c                 ó²   • U R                  X0R                  5      (       d7  SUR                   SU R                   SU R                   SU 3n[	        U5      eg)r.   r/   r0   r£   ú: N)Úcompare_funcÚboundr5   Ú
compare_oprW   r8   s        r"   r>   Ú_NumberValidator.__call__ª  sS   € ð × Ñ  ¯
©
×3Ñ3Ø�d—i‘i�[ 
¨4¯?©?Ð*;¸1¸T¿Z¹Z¸LÈÈ5È'ÐRˆCÜ˜S“/Ð!ð 4r#   c                 ó<   • SU R                    SU R                   S3$ )Nz<Validator for x r£   rA   )r¹   r¸   rC   s    r"   rD   Ú_NumberValidator.__repr__²  s    € Ø" 4§?¡?Ð"3°1°T·Z±Z°LÀÐBÐBr#   r%   N)rH   rI   rJ   rK   r
   r¸   r¹   r·   r>   rD   rL   r%   r#   r"   r´   r´   ¤  s"   † á‹H€EÙ“€JÙ“8€Lò"õCr#   r´   c                 ó8   • [        U S[        R                  5      $ )zð
A validator that raises `ValueError` if the initializer is called with a
number larger or equal to *val*.

The validator uses `operator.lt` to compare the values.

Args:
    val: Exclusive upper bound for values.

.. versionadded:: 21.3.0
Ú<)r´   Úoperatorr   ©Úvals    r"   r   r   ¶  ó   € ô ˜C ¤h§k¡kÓ2Ð2r#   c                 ó8   • [        U S[        R                  5      $ )zê
A validator that raises `ValueError` if the initializer is called with a
number greater than *val*.

The validator uses `operator.le` to compare the values.

Args:
    val: Inclusive upper bound for values.

.. versionadded:: 21.3.0
z<=)r´   r¿   r   rÀ   s    r"   r   r   Å  ó   € ô ˜C ¤x§{¡{Ó3Ð3r#   c                 ó8   • [        U S[        R                  5      $ )zé
A validator that raises `ValueError` if the initializer is called with a
number smaller than *val*.

The validator uses `operator.ge` to compare the values.

Args:
    val: Inclusive lower bound for values

.. versionadded:: 21.3.0
z>=)r´   r¿   r   rÀ   s    r"   r   r   Ô  rÄ   r#   c                 ó8   • [        U S[        R                  5      $ )zï
A validator that raises `ValueError` if the initializer is called with a
number smaller or equal to *val*.

The validator uses `operator.ge` to compare the values.

Args:
   val: Exclusive lower bound for values

.. versionadded:: 21.3.0
rA   )r´   r¿   r   rÀ   s    r"   r   r   ã  rÂ   r#   c                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_MaxLengthValidatoriò  c                 óœ   • [        U5      U R                  :”  a3  SUR                   SU R                   S[        U5       3n[        U5      eg)r.   úLength of 'z' must be <= r¶   N)ÚlenÚ
max_lengthr5   rW   r8   s        r"   r>   Ú_MaxLengthValidator.__call__ö  óH   € ô ˆu‹:˜Ÿ™Ó'Ø §	¡	˜{¨-¸¿¹Ð7HÈÌ3ÈuË:È,ÐWˆCÜ˜S“/Ð!ð (r#   c                 ó"   • SU R                    S3$ )Nz<max_len validator for rA   )rÌ   rC   s    r"   rD   Ú_MaxLengthValidator.__repr__þ  ó   € Ø(¨¯©Ð(9¸Ð;Ð;r#   r%   N)	rH   rI   rJ   rK   r
   rÌ   r>   rD   rL   r%   r#   r"   rÈ   rÈ   ò  ó   † á“€Jò"õ<r#   rÈ   c                 ó   • [        U 5      $ )z×
A validator that raises `ValueError` if the initializer is called
with a string or iterable that is longer than *length*.

Args:
    length (int): Maximum length of the string or iterable

.. versionadded:: 21.3.0
)rÈ   ©Úlengths    r"   r   r     ó   € ô ˜vÓ&Ð&r#   c                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_MinLengthValidatori  c                 óœ   • [        U5      U R                  :  a3  SUR                   SU R                   S[        U5       3n[        U5      eg)r.   rÊ   z' must be >= r¶   N)rË   Ú
min_lengthr5   rW   r8   s        r"   r>   Ú_MinLengthValidator.__call__  rÎ   r#   c                 ó"   • SU R                    S3$ )Nz<min_len validator for rA   )rÚ   rC   s    r"   rD   Ú_MinLengthValidator.__repr__  rÑ   r#   r%   N)	rH   rI   rJ   rK   r
   rÚ   r>   rD   rL   r%   r#   r"   rØ   rØ     rÒ   r#   rØ   c                 ó   • [        U 5      $ )zØ
A validator that raises `ValueError` if the initializer is called
with a string or iterable that is shorter than *length*.

Args:
    length (int): Minimum length of the string or iterable

.. versionadded:: 22.1.0
)rØ   rÔ   s    r"   r   r     rÖ   r#   c                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_SubclassOfValidatori,  c                 ó¬   • [        X0R                  5      (       d:  SUR                   SU R                  < SU< S3n[        UUU R                  U5      eg)r.   r/   z' must be a subclass of r1   r2   N)Ú
issubclassr4   r5   r7   r8   s        r"   r>   Ú_SubclassOfValidator.__call__0  sY   € ô ˜%§¡×+Ñ+Ø�d—i‘i�[Ð 8¸¿¹¹ÀVÈEÉ9ÐTVÐWˆCÜØØØ—	‘	Øó	ð ð ,r#   c                 ó$   • SU R                   < S3$ )Nz <subclass_of validator for type rA   rB   rC   s    r"   rD   Ú_SubclassOfValidator.__repr__=  rF   r#   r%   NrG   r%   r#   r"   rà   rà   ,  rM   r#   rà   c                 ó   • [        U 5      $ )a¸  
A validator that raises a `TypeError` if the initializer is called with a
wrong type for this particular attribute (checks are performed using
`issubclass` therefore it's also valid to pass a tuple of types).

Args:
    type (type | tuple[type, ...]): The type(s) to check for.

Raises:
    TypeError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected type, and the value it got.
)rà   rB   s    r"   Ú_subclass_ofrç   A  rO   r#   c                   ót   • \ rS rSr\" 5       r\" \" S5      S9r\" \" \	" \
5      \" \5      S9S9rS rS rSrg	)
Ú_NotValidatoriR  zCnot_ validator child '{validator!r}' did not raise a captured error)Ú	converterr§   rt   c                 óò   •  U R                  XU5        [        U R                  R                  U R                   U R                  S9UU R                   UU R                  5      e! U R                   a     g f = f)N©ru   Ú	exc_types)ru   rW   r=   rf   rí   rv   s       r"   r>   Ú_NotValidator.__call__b  su   € ð	Ø�N‰N˜4 uÔ-ô Ø—‘—‘Ø"Ÿn™nØ"Ÿn™nð  ð ð Ø—‘ØØ—‘ó	ð 	øð �~‰~ó 	Ùð	ús   ‚A# Á#A6Á5A6c                 ó@   • SU R                   < SU R                  < S3$ )Nz<not_ validator wrapping z, capturing rA   rì   rC   s    r"   rD   Ú_NotValidator.__repr__s  s"   € Ø*¨4¯>©>Ñ*<¸LÈÏÉÑHZÐZ[Ð\Ð\r#   r%   N)rH   rI   rJ   rK   r
   ru   r   r=   r   rç   Ú	Exceptionr   r|   rí   r>   rD   rL   r%   r#   r"   ré   ré   R  sO   † á“€IÙ
Ù!ð-ó
ñ€Cñ ÙÙ)¨)Ó4Ù*¨5Ó1ñ
ñ€Iòõ"]r#   ré   )r=   rí   c                óX   •  [        U5      n[        XU5      $ ! [         a    U4n Nf = f)aæ  
A validator that wraps and logically 'inverts' the validator passed to it.
It will raise a `ValueError` if the provided validator *doesn't* raise a
`ValueError` or `TypeError` (by default), and will suppress the exception
if the provided validator *does*.

Intended to be used with existing validators to compose logic without
needing to create inverted variants, for example, ``not_(in_(...))``.

Args:
    validator: A validator to be logically inverted.

    msg (str):
        Message to raise if validator fails. Formatted with keys
        ``exc_types`` and ``validator``.

    exc_types (tuple[type, ...]):
        Exception type(s) to capture. Other types raised by child
        validators will not be intercepted and pass through.

Raises:
    ValueError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the validator that failed to raise an
        exception, the value it got, and the expected exception types.

.. versionadded:: 22.2.0
)r|   r7   ré   )ru   r=   rí   s      r"   r   r   w  s8   € ð:!Ü˜)Ó$ˆ	ô ˜¨Ó3Ð3øô ó !Ø�LŠ	ð!ús   ‚ ™)¨)c                   ó.   • \ rS rSr\" 5       rS rS rSrg)Ú_OrValidatori›  c                 óœ   • U R                    H  n U" XU5          g    SU R                   < SU< 3n[        U5      e! [         a     M=  f = f)NzNone of z satisfied for value )Ú
validatorsrñ   rW   )r9   r:   r;   r<   Úvr=   s         r"   r>   Ú_OrValidator.__call__Ÿ  s\   € Ø—”ˆAðÙ�$˜eÔ$ñ ñ !ð ˜Ÿ™Ñ+Ð+@ÀÁ	ÐJˆÜ˜‹oÐøô ó Úðús   ‘	=½
AÁ
Ac                 ó$   • SU R                   < S3$ )Nz<or validator wrapping rA   )rö   rC   s    r"   rD   Ú_OrValidator.__repr__«  s   € Ø(¨¯©Ñ(;¸1Ð=Ð=r#   r%   N)	rH   rI   rJ   rK   r
   rö   r>   rD   rL   r%   r#   r"   rô   rô   ›  s   † á“€Jò
õ>r#   rô   c                  ó¦   • / nU  H6  nUR                  [        U[        5      (       a  UR                  OU/5        M8     [        [	        U5      5      $ )aÛ  
A validator that composes multiple validators into one.

When called on a value, it runs all wrapped validators until one of them is
satisfied.

Args:
    validators (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of validators.

Raises:
    ValueError:
        If no validator is satisfied. Raised with a human-readable error
        message listing all the wrapped validators and the value that
        failed all of them.

.. versionadded:: 24.1.0
)Úextendr3   rô   rö   r|   )rö   Úvalsr÷   s      r"   r   r   ¯  sD   € ð& €DÛˆØ�‰¤J¨q´,×$?Ñ$?�A—L’LÀaÀSÖIñ ô œ˜d›Ó$Ð$r#   )r   Nrs   )5Ú__doc__r¿   rb   Ú
contextlibr   r   Ú_configr   r   Ú_maker   r	   r
   r   Ú
convertersr   Ú
exceptionsr   Ú__all__r   r   r   r+   r   rR   r   rp   r   r~   r   r�   r   r—   r   r©   r   r´   r   r   r   r   rÈ   r   rØ   r   rà   rç   ré   rW   r7   r   rô   r   r%   r#   r"   Ú<module>r     s  ðñó Û 	å %Ý ç ;ß 5Ó 5Ý 'Ý (ò€ò.%ò$	$ð ñ!ó ð!ñ" ˆE˜¨4Ñ0÷Að Aó 1ðAò(&ñ" ˆE˜$ dÑ+÷Fð Fó ,ðFô*-4ñ` ˆE˜¨4Ñ0÷
Fð 
Fó 1ð
Fò)ñ* ˆE˜¨4Ñ0÷Jð Jó 1ðJò. /ñF ˆE˜¨DÑ1÷)ð )ó 2ð)ò*"ñ  ˆE˜¨4Ñ0÷
ð 
ó 1ð
ô8?ñ( ˆE˜¨4Ñ0÷rð ró 1ðrô(Kñ( ˆE˜$ dÑ+÷Cð Có ,ðCò"3ò4ò4ò3ñ ˆE˜$ dÑ+÷<ð <ó ,ð<ò
'ñ ˆE˜$ dÑ+÷<ð <ó ,ð<ò
'ñ ˆE˜¨4Ñ0÷Að Aó 1ðAò(&ñ" ˆE˜¨4Ñ0÷!]ð !]ó 1ð!]ðH  ¨J¸	Ð+Bõ !4ñH ˆE˜¨4Ñ0÷>ð >ó 1ð>ó&%r#   