§
    ¦cP  ã                   ó¶  — d Z ddlZddlZddlmZ ddlmZmZ ddlm	Z	m
Z
mZmZ ddlmZ ddlmZ 	 ej        Zn$# e$ r  e ej        d	¦  «        ¦  «        ZY nw xY wg d
¢Zd„ Zd„ Zed„ ¦   «         Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd=d„Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z  eddd¬¦  «         G d„ d¦  «        ¦   «         Z!d „ Z" eddd¬¦  «         G d!„ d"¦  «        ¦   «         Z#d#„ Z$ eddd¬¦  «         G d$„ d%¦  «        ¦   «         Z%d>d&„Z& eddd¬¦  «         G d'„ d(¦  «        ¦   «         Z'd>d)„Z( eddd¬¦  «         G d*„ d+¦  «        ¦   «         Z)d,„ Z*d-„ Z+d.„ Z,d/„ Z- eddd¬¦  «         G d0„ d1¦  «        ¦   «         Z.d2„ Z/ eddd¬¦  «         G d3„ d4¦  «        ¦   «         Z0d5„ Z1 eddd¬¦  «         G d6„ d7¦  «        ¦   «         Z2d8„ Z3 eddd¬¦  «         G d9„ d:¦  «        ¦   «         Z4de5e6fd;œd<„Z7dS )?z
Commonly useful validators.
é    N)Úcontextmanageré   )Ú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ÚprovidesÚset_disabledc                 ó&   — t          |  ¦  «         dS )a  
    Globally disable or enable running validators.

    By default, they are run.

    :param disabled: If ``True``, disable running all validators.
    :type disabled: bool

    .. 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   0   s   € õ ˜8�|Ñ$Ô$Ð$Ð$Ð$ó    c                  ó    — t          ¦   «          S )zÀ
    Return a bool indicating whether validators are currently disabled or not.

    :return: ``True`` if validators are currently disabled.
    :rtype: bool

    .. versionadded:: 21.3.0
    )r   © r#   r"   r   r   B   s   € õ "Ñ#Ô#Ð#Ð#r#   c               #   óx   K  — t          d¦  «         	 dV — t          d¦  «         dS # t          d¦  «         w xY w)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   N   sM   è è € õ �uÑÔÐð!Øˆˆˆå˜4Ñ Ô Ð Ð Ð øÕ˜4Ñ Ô Ð Ð øøøs   “( ¨9FT)ÚreprÚslotsÚhashc                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_InstanceOfValidatorc                 óª   — t          || j        ¦  «        s=t          d                     |j        | j        |j        |¬¦  «        || j        |¦  «        ‚dS )úP
        We use a callable class to be able to change the ``__repr__``.
        z?'{name}' must be {type!r} (got {value!r} that is a {actual!r}).)ÚnameÚtypeÚactualÚvalueN)Ú
isinstancer/   Ú	TypeErrorÚformatr.   Ú	__class__©ÚselfÚinstÚattrr1   s       r"   Ú__call__z_InstanceOfValidator.__call__d   sl   € õ ˜% ¤Ñ+Ô+ð 	Ýðß%švØœØœØ œ?Øð	  &ñ  ô  ð Ø”	Øñô ð ð	ð 	r#   c                 ó8   — d                      | j        ¬¦  «        S )Nz)<instance_of validator for type {type!r}>©r/   ©r4   r/   ©r7   s    r"   Ú__repr__z_InstanceOfValidator.__repr__v   ó%   € Ø:×AÒAØ”ð Bñ 
ô 
ð 	
r#   N©Ú__name__Ú
__module__Ú__qualname__r	   r/   r:   r?   r%   r#   r"   r+   r+   `   s=   € € € € € àˆ6‰8Œ8€Dðð ð ð$
ð 
ð 
ð 
ð 
r#   r+   c                 ó    — t          | ¦  «        S )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).

    :param type: The type to check for.
    :type type: type or tuple of type

    :raises TypeError: With a human readable error message, the attribute
        (of type `attrs.Attribute`), the expected type, and the value it
        got.
    )r+   r<   s    r"   r   r   |   ó   € õ   Ñ%Ô%Ð%r#   )r'   Úfrozenr(   c                   óB   — e Zd Z e¦   «         Z e¦   «         Zd„ Zd„ ZdS )Ú_MatchesReValidatorc                 ó¨   — |                       |¦  «        s<t          d                     |j        | j        j        |¬¦  «        || j        |¦  «        ‚dS )r-   z9'{name}' must match regex {pattern!r} ({value!r} doesn't))r.   Úpatternr1   N)Ú
match_funcÚ
ValueErrorr4   r.   rK   r6   s       r"   r:   z_MatchesReValidator.__call__‘   sh   € ð �Š˜uÑ%Ô%ð 		Ýð'ß'-¢vØœ¨D¬LÔ,@Èð (.ñ (ô (ð Ø”Øñô ð ð		ð 		r#   c                 ó8   — d                      | j        ¬¦  «        S )Nz.<matches_re validator for pattern {pattern!r}>)rK   )r4   rK   r>   s    r"   r?   z_MatchesReValidator.__repr__    s%   € Ø?×FÒFØ”Lð Gñ 
ô 
ð 	
r#   N)rB   rC   rD   r	   rK   rL   r:   r?   r%   r#   r"   rI   rI   Œ   sH   € € € € € àˆf‰hŒh€GØ�‘”€Jðð ð ð
ð 
ð 
ð 
ð 
r#   rI   c                 ó  — t           j        dt           j        t           j        f}||vrYt	          d                     d                     t          d„ t          |¦  «        D ¦   «         ¦  «        ¦  «        ¦  «        ¦  «        ‚t          | t          ¦  «        r|rt          d¦  «        ‚| }nt          j        | |¦  «        }|t           j        u r|j        }n|t           j        u r|j        }n|j        }t          ||¦  «        S )aœ  
    A validator that raises `ValueError` if the initializer is called
    with a string that doesn't match *regex*.

    :param regex: a regex string or precompiled pattern to match against
    :param int flags: flags that will be passed to the underlying re function
        (default 0)
    :param callable func: 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   ó,   K  — | ]}|r|j         pd V — ŒdS )ÚNoneN)rB   )Ú.0Úes     r"   ú	<genexpr>zmatches_re.<locals>.<genexpr>»   s?   è è € ð ð Ø78˜Ð(˜aœjÐ2¨Fðð ð ð ð ð r#   zR'flags' can only be used with a string pattern; pass flags to re.compile() instead)ÚreÚ	fullmatchÚsearchÚmatchrM   r4   ÚjoinÚsortedÚsetr2   ÚPatternr3   ÚcompilerI   )ÚregexÚflagsÚfuncÚvalid_funcsrK   rL   s         r"   r   r   ¦   s  € õ  ”< ¥r¤yµ"´(Ð;€KØ�;ÐÐÝØ'×.Ò.Ø—	’	Ýð ð Ý<?ÀÑ<LÔ<Lðñ ô ñ ô ñô ñô ñ
ô 
ð 	
õ �%�Ñ!Ô!ð +Øð 	Ýð5ñô ð ð ˆˆå”*˜U EÑ*Ô*ˆà�rŒxÐÐØ”]ˆ
ˆ
Ø	•”Ð	Ð	Ø”^ˆ
ˆ
àÔ&ˆ
å˜w¨
Ñ3Ô3Ð3r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_ProvidesValidatorc                 ó¨   — | j                              |¦  «        s7t          d                     |j        | j         |¬¦  «        || j         |¦  «        ‚dS )r-   z<'{name}' must provide {interface!r} which {value!r} doesn't.)r.   Ú	interfacer1   N)re   Ú
providedByr3   r4   r.   r6   s       r"   r:   z_ProvidesValidator.__call__Ú   si   € ð Œ~×(Ò(¨Ñ/Ô/ð 		Ýðß!š6Øœ¨d¬nÀEð "ñ ô ð Ø”Øñô ð ð		ð 		r#   c                 ó8   — d                      | j        ¬¦  «        S )Nz0<provides validator for interface {interface!r}>©re   )r4   re   r>   s    r"   r?   z_ProvidesValidator.__repr__é   s%   € ØA×HÒHØ”nð Iñ 
ô 
ð 	
r#   N)rB   rC   rD   r	   re   r:   r?   r%   r#   r"   rc   rc   Ö   s=   € € € € € à�‘”€Iðð ð ð
ð 
ð 
ð 
ð 
r#   rc   c                 ó    — t          | ¦  «        S )a)  
    A validator that raises a `TypeError` if the initializer is called
    with an object that does not provide the requested *interface* (checks are
    performed using ``interface.providedBy(value)`` (see `zope.interface
    <https://zopeinterface.readthedocs.io/en/latest/>`_).

    :param interface: The interface to check for.
    :type interface: ``zope.interface.Interface``

    :raises TypeError: With a human readable error message, the attribute
        (of type `attrs.Attribute`), the expected interface, and the
        value it got.
    )rc   rh   s    r"   r   r   ï   s   € õ ˜iÑ(Ô(Ð(r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_OptionalValidatorc                 ó<   — |€d S |                       |||¦  «         d S ©N©Ú	validatorr6   s       r"   r:   z_OptionalValidator.__call__  s(   € Øˆ=ØˆFà�Š�t˜T 5Ñ)Ô)Ð)Ð)Ð)r#   c                 óR   — d                      t          | j        ¦  «        ¬¦  «        S )Nz'<optional validator for {what} or None>)Úwhat)r4   r'   ro   r>   s    r"   r?   z_OptionalValidator.__repr__
  s-   € Ø8×?Ò?Ý�d”nÑ%Ô%ð @ñ 
ô 
ð 	
r#   N)rB   rC   rD   r	   ro   r:   r?   r%   r#   r"   rk   rk      s=   € € € € € à�‘”€Ið*ð *ð *ð
ð 
ð 
ð 
ð 
r#   rk   c                 ó‚   — t          | t          ¦  «        rt          t          | ¦  «        ¦  «        S t          | ¦  «        S )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.

    :param validator: A validator (or a list of validators) that is used for
        non-``None`` values.
    :type validator: callable or `list` of callables.

    .. versionadded:: 15.1.0
    .. versionchanged:: 17.1.0 *validator* can be a list of validators.
    )r2   Úlistrk   r   rn   s    r"   r   r     s:   € õ �)�TÑ"Ô"ð <Ý!¥-°	Ñ":Ô":Ñ;Ô;Ð;Ý˜iÑ(Ô(Ð(r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_InValidatorc                 ó²   — 	 || j         v }n# t          $ r d}Y nw xY w|s7t          d                     |j        | j         |¬¦  «        || j         |¦  «        ‚d S )NFz/'{name}' must be in {options!r} (got {value!r}))r.   Úoptionsr1   )rw   r3   rM   r4   r.   )r7   r8   r9   r1   Ú
in_optionss        r"   r:   z_InValidator.__call__&  s�   € ð	Ø $¤,Ð.ˆJˆJøÝð 	ð 	ð 	ØˆJˆJˆJð	øøøð ð 	ÝØA×HÒHØœ¨D¬LÀð Iñ ô ð Ø”Øñô ð ð	ð 	s   ‚	 Œšc                 ó8   — d                      | j        ¬¦  «        S )Nz(<in_ validator with options {options!r}>©rw   )r4   rw   r>   s    r"   r?   z_InValidator.__repr__6  s%   € Ø9×@Ò@Ø”Lð Añ 
ô 
ð 	
r#   N)rB   rC   rD   r	   rw   r:   r?   r%   r#   r"   ru   ru   "  s=   € € € € € àˆf‰hŒh€Gðð ð ð 
ð 
ð 
ð 
ð 
r#   ru   c                 ó    — t          | ¦  «        S )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``.

    :param options: Allowed options.
    :type options: list, tuple, `enum.Enum`, ...

    :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.
    )ru   rz   s    r"   r   r   <  s   € õ& ˜Ñ Ô Ð r#   c                   ó   — e Zd Zd„ Zd„ ZdS )Ú_IsCallableValidatorc                 óŠ   — t          |¦  «        s3d}t          |                     |j        ||j        ¬¦  «        |¬¦  «        ‚dS )r-   z?'{name}' must be callable (got {value!r} that is a {actual!r}).)r.   r1   r0   )Úmsgr1   N)Úcallabler   r4   r.   r5   )r7   r8   r9   r1   Úmessages        r"   r:   z_IsCallableValidator.__call__T  se   € õ ˜‰Œð 
	ð8ð õ #Ø—N’NØœ¨%¸¼ð #ñ ô ð ð	ñ ô ð ð
	ð 
	r#   c                 ó   — dS )Nz<is_callable validator>r%   r>   s    r"   r?   z_IsCallableValidator.__repr__d  s   € Ø(Ð(r#   N)rB   rC   rD   r:   r?   r%   r#   r"   r}   r}   R  s2   € € € € € ðð ð ð )ð )ð )ð )ð )r#   r}   c                  ó   — t          ¦   «         S )ax  
    A validator that raises a `attr.exceptions.NotCallableError` if the
    initializer is called with a value for this particular attribute
    that is not callable.

    .. versionadded:: 19.1.0

    :raises `attr.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   h  s   € õ  Ñ!Ô!Ð!r#   c                   ó~   — e Zd Z e e¦   «         ¬¦  «        Z ed e e¦   «         ¦  «        ¬¦  «        Zd„ Zd„ Z	dS )Ú_DeepIterablern   N©Údefaultro   c                 óz   — | j         �|                       |||¦  «         |D ]}|                      |||¦  «         ŒdS ©r-   N)Úiterable_validatorÚmember_validator)r7   r8   r9   r1   Úmembers        r"   r:   z_DeepIterable.__call__~  sY   € ð Ô"Ð.Ø×#Ò# D¨$°Ñ6Ô6Ð6àð 	6ð 	6ˆFØ×!Ò! $¨¨fÑ5Ô5Ð5Ð5ð	6ð 	6r#   c                 ó`   — | j         €dn	d| j         ›�}d                     || j        ¬¦  «        S )Nr   ú zJ<deep_iterable validator for{iterable_identifier} iterables of {member!r}>)Úiterable_identifierrŒ   )rŠ   r4   r‹   )r7   r�   s     r"   r?   z_DeepIterable.__repr__ˆ  sN   € ð Ô&Ð.ð ˆBà0�TÔ,Ð0Ð0ð 	ð(ç
Š&Ø 3ØÔ(ð ñ 
ô 
ð	
r#   )
rB   rC   rD   r	   r   r‹   r   rŠ   r:   r?   r%   r#   r"   r…   r…   w  sw   € € € € € à�v¨¨©¬Ð6Ñ6Ô6ÐØ˜Ø  ¨¨©¬Ñ 7Ô 7ðñ ô Ðð6ð 6ð 6ð
ð 
ð 
ð 
ð 
r#   r…   c                 ól   — t          | t          t          f¦  «        r	t          | Ž } t	          | |¦  «        S )a4  
    A validator that performs deep validation of an iterable.

    :param member_validator: Validator(s) to apply to iterable members
    :param iterable_validator: Validator to apply to iterable itself
        (optional)

    .. versionadded:: 19.1.0

    :raises TypeError: if any sub-validators fail
    )r2   rs   Útupler   r…   ©r‹   rŠ   s     r"   r   r   —  s9   € õ Ð"¥T­5 MÑ2Ô2ð 3ÝÐ!1Ð2ÐÝÐ)Ð+=Ñ>Ô>Ð>r#   c                   ó¦   — e Zd Z e e¦   «         ¬¦  «        Z e e¦   «         ¬¦  «        Z ed e e¦   «         ¦  «        ¬¦  «        Zd„ Z	d„ Z
dS )Ú_DeepMappingrn   Nr†   c                 ó´   — | j         �|                       |||¦  «         |D ]6}|                      |||¦  «         |                      ||||         ¦  «         Œ7dS r‰   )Úmapping_validatorÚkey_validatorÚvalue_validator)r7   r8   r9   r1   Úkeys        r"   r:   z_DeepMapping.__call__®  su   € ð Ô!Ð-Ø×"Ò" 4¨¨uÑ5Ô5Ð5àð 	9ð 	9ˆCØ×Ò˜t T¨3Ñ/Ô/Ð/Ø× Ò   t¨U°3¬ZÑ8Ô8Ð8Ð8ð	9ð 	9r#   c                 óD   — d                      | j        | j        ¬¦  «        S )NzA<deep_mapping validator for objects mapping {key!r} to {value!r}>)r™   r1   )r4   r—   r˜   r>   s    r"   r?   z_DeepMapping.__repr__¹  s"   € àOß
Š&�TÔ'¨tÔ/Cˆ&Ñ
DÔ
Dð	Er#   )rB   rC   rD   r	   r   r—   r˜   r   r–   r:   r?   r%   r#   r"   r”   r”   ¨  sŒ   € € € € € à�F [ [¡]¤]Ð3Ñ3Ô3€MØ�f { {¡}¤}Ð5Ñ5Ô5€OØ˜ t°x°xÀÀÁÄÑ7NÔ7NÐOÑOÔOÐð	9ð 	9ð 	9ðEð Eð Eð Eð Er#   r”   c                 ó$   — t          | ||¦  «        S )a}  
    A validator that performs deep validation of a dictionary.

    :param key_validator: Validator to apply to dictionary keys
    :param value_validator: Validator to apply to dictionary values
    :param 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ÔJÐJr#   c                   óV   — e Zd Z e¦   «         Z e¦   «         Z e¦   «         Zd„ Zd„ ZdS )Ú_NumberValidatorc                 ó¦   — |                       || j        ¦  «        s5t          d                     |j        | j        | j        |¬¦  «        ¦  «        ‚dS )r-   z&'{name}' must be {op} {bound}: {value})r.   ÚopÚboundr1   N)Úcompare_funcr    rM   r4   r.   Ú
compare_opr6   s       r"   r:   z_NumberValidator.__call__Õ  se   € ð × Ò  ¨¬
Ñ3Ô3ð 	ÝØ8×?Ò?ØœØ”Øœ*Øð	 @ñ ô ñô ð ð	ð 	r#   c                 óD   — d                      | j        | j        ¬¦  «        S )Nz<Validator for x {op} {bound}>)rŸ   r    )r4   r¢   r    r>   s    r"   r?   z_NumberValidator.__repr__ã  s(   € Ø/×6Ò6ØŒ d¤jð 7ñ 
ô 
ð 	
r#   N)	rB   rC   rD   r	   r    r¢   r¡   r:   r?   r%   r#   r"   r�   r�   Ï  sS   € € € € € àˆF‰HŒH€EØ�‘”€JØ�6‘8”8€Lðð ð ð
ð 
ð 
ð 
ð 
r#   r�   c                 ó8   — t          | dt          j        ¦  «        S )zÇ
    A validator that raises `ValueError` if the initializer is called
    with a number larger or equal to *val*.

    :param val: Exclusive upper bound for values

    .. versionadded:: 21.3.0
    ú<)r�   Úoperatorr   ©Úvals    r"   r   r   é  ó   € õ ˜C ¥h¤kÑ2Ô2Ð2r#   c                 ó8   — t          | dt          j        ¦  «        S )zÁ
    A validator that raises `ValueError` if the initializer is called
    with a number greater than *val*.

    :param val: Inclusive upper bound for values

    .. versionadded:: 21.3.0
    z<=)r�   r¦   r   r§   s    r"   r   r   õ  ó   € õ ˜C ¥x¤{Ñ3Ô3Ð3r#   c                 ó8   — t          | dt          j        ¦  «        S )zÁ
    A validator that raises `ValueError` if the initializer is called
    with a number smaller than *val*.

    :param val: Inclusive lower bound for values

    .. versionadded:: 21.3.0
    z>=)r�   r¦   r   r§   s    r"   r   r     r«   r#   c                 ó8   — t          | dt          j        ¦  «        S )zÈ
    A validator that raises `ValueError` if the initializer is called
    with a number smaller or equal to *val*.

    :param val: Exclusive lower bound for values

    .. versionadded:: 21.3.0
    ú>)r�   r¦   r   r§   s    r"   r   r     r©   r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_MaxLengthValidatorc           	      ó®   — t          |¦  «        | j        k    r<t          d                     |j        | j        t          |¦  «        ¬¦  «        ¦  «        ‚dS )r-   z*Length of '{name}' must be <= {max}: {len})r.   ÚmaxÚlenN)r³   Ú
max_lengthrM   r4   r.   r6   s       r"   r:   z_MaxLengthValidator.__call__  ó[   € õ ˆu‰:Œ:˜œÒ'Ð'ÝØ<×CÒCØœ¨¬½SÀ¹Z¼Zð Dñ ô ñô ð ð (Ð'r#   c                 ó   — d| j         › d�S )Nz<max_len validator for r®   )r´   r>   s    r"   r?   z_MaxLengthValidator.__repr__(  ó   € Ø;¨¬Ð;Ð;Ð;Ð;r#   N)rB   rC   rD   r	   r´   r:   r?   r%   r#   r"   r°   r°     ó=   € € € € € à�‘”€Jð	ð 	ð 	ð<ð <ð <ð <ð <r#   r°   c                 ó    — t          | ¦  «        S )zæ
    A validator that raises `ValueError` if the initializer is called
    with a string or iterable that is longer than *length*.

    :param int length: Maximum length of the string or iterable

    .. versionadded:: 21.3.0
    )r°   ©Úlengths    r"   r   r   ,  ó   € õ ˜vÑ&Ô&Ð&r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_MinLengthValidatorc           	      ó®   — t          |¦  «        | j        k     r<t          d                     |j        | j        t          |¦  «        ¬¦  «        ¦  «        ‚dS )r-   z*Length of '{name}' must be => {min}: {len})r.   Úminr³   N)r³   Ú
min_lengthrM   r4   r.   r6   s       r"   r:   z_MinLengthValidator.__call__<  rµ   r#   c                 ó   — d| j         › d�S )Nz<min_len validator for r®   )rÁ   r>   s    r"   r?   z_MinLengthValidator.__repr__G  r·   r#   N)rB   rC   rD   r	   rÁ   r:   r?   r%   r#   r"   r¾   r¾   8  r¸   r#   r¾   c                 ó    — t          | ¦  «        S )zç
    A validator that raises `ValueError` if the initializer is called
    with a string or iterable that is shorter than *length*.

    :param int length: Minimum length of the string or iterable

    .. versionadded:: 22.1.0
    )r¾   rº   s    r"   r   r   K  r¼   r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_SubclassOfValidatorc                 óž   — t          || j        ¦  «        s7t          d                     |j        | j        |¬¦  «        || j        |¦  «        ‚dS )r-   z8'{name}' must be a subclass of {type!r} (got {value!r}).)r.   r/   r1   N)Ú
issubclassr/   r3   r4   r.   r6   s       r"   r:   z_SubclassOfValidator.__call__[  sg   € õ ˜% ¤Ñ+Ô+ð 	Ýð#ß#)¢6ØœØœØð $*ñ $ô $ð
 Ø”	Øñ
ô 
ð 
ð	ð 	r#   c                 ó8   — d                      | j        ¬¦  «        S )Nz)<subclass_of validator for type {type!r}>r<   r=   r>   s    r"   r?   z_SubclassOfValidator.__repr__l  r@   r#   NrA   r%   r#   r"   rÅ   rÅ   W  s=   € € € € € àˆ6‰8Œ8€Dðð ð ð"
ð 
ð 
ð 
ð 
r#   rÅ   c                 ó    — t          | ¦  «        S )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).

    :param type: The type to check for.
    :type type: type or tuple of types

    :raises TypeError: With a human readable error message, the attribute
        (of type `attrs.Attribute`), the expected type, and the value it
        got.
    )rÅ   r<   s    r"   Ú_subclass_ofrÊ   r  rF   r#   c                   óª   — e Zd Z e¦   «         Z e ed¦  «        ¬¦  «        Z e e ee	¦  «         e
e¦  «        ¬¦  «        ¬¦  «        Zd„ Zd„ ZdS )Ú_NotValidatorzCnot_ validator child '{validator!r}' did not raise a captured error)Ú	converterr’   rn   c                 óÖ   — 	 |                       |||¦  «         t          | j                             | j         | j        ¬¦  «        || j         || j        ¦  «        ‚# | j        $ r Y d S w xY w)N)ro   Ú	exc_types)ro   rM   r   r4   rÏ   r6   s       r"   r:   z_NotValidator.__call__’  s‹   € ð	Ø�NŠN˜4  uÑ-Ô-Ð-õ Ø”—’Ø"œnØ"œnð  ñ ô ð Ø”ØØ”ñ	ô 	ð 	øð Œ~ð 	ð 	ð 	ØˆDˆDð	øøøs   ‚A Á
A(Á'A(c                 óD   — d                      | j        | j        ¬¦  «        S )Nz;<not_ validator wrapping {what!r}, capturing {exc_types!r}>)rq   rÏ   )r4   ro   rÏ   r>   s    r"   r?   z_NotValidator.__repr__£  s(   € àLß
Š&Ø”Ø”nð ñ 
ô 
ð	
r#   N)rB   rC   rD   r	   ro   r   r   r   rÊ   Ú	Exceptionr   r‘   rÏ   r:   r?   r%   r#   r"   rÌ   rÌ   ‚  s­   € € € € € à�‘”€IØ
ˆ&Ø!�/ð-ñ
ô 
ðñ ô €Cð �Ø�-Ø)˜\¨)Ñ4Ô4Ø*˜{¨5Ñ1Ô1ð
ñ 
ô 
ðñ ô €Iðð ð ð"
ð 
ð 
ð 
ð 
r#   rÌ   )r   rÏ   c                ól   — 	 t          |¦  «        }n# t          $ r |f}Y nw xY wt          | ||¦  «        S )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_(...))``.

    :param validator: A validator to be logically inverted.
    :param msg: Message to raise if validator fails.
        Formatted with keys ``exc_types`` and ``validator``.
    :type msg: str
    :param exc_types: 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‘   r3   rÌ   )ro   r   rÏ   s      r"   r   r   ¬  sN   € ð4!Ý˜)Ñ$Ô$ˆ	ˆ	øÝð !ð !ð !Ø�Lˆ	ˆ	ˆ	ð!øøøå˜ C¨Ñ3Ô3Ð3s   ‚ ’"¡")r   Nrm   )8Ú__doc__r¦   rU   Ú
contextlibr   Ú_configr   r   Ú_maker   r   r	   r
   Ú
convertersr   Ú
exceptionsr   r\   ÚAttributeErrorr/   r]   Ú__all__r   r   r   r+   r   rI   r   rc   r   rk   r   ru   r   r}   r   r…   r   r”   r   r�   r   r   r   r   r°   r   r¾   r   rÅ   rÊ   rÌ   rM   r3   r   r%   r#   r"   ú<module>rÛ      sà  ððð ð
 €€€Ø 	€	€	€	à %Ð %Ð %Ð %Ð %Ð %à ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø (Ð (Ð (Ð (Ð (Ð (ð#ØŒj€G€GøØð #ð #ð #Øˆd�:�2”:˜b‘>”>Ñ"Ô"€G€G€Gð#øøøðð ð €ð.%ð %ð %ð$	$ð 	$ð 	$ð ð!ð !ñ „ð!ð" €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð6&ð &ð &ð  €ˆE˜$ dÐ+Ñ+Ô+ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ ,Ô+ð
ð2-4ð -4ð -4ð -4ð` €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð0)ð )ð )ð" €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð)ð )ð )ð$ €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð2!ð !ð !ð, €ˆE˜ TÐ*Ñ*Ô*ð)ð )ð )ð )ð )ñ )ô )ñ +Ô*ð)ð*"ð "ð "ð €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð>?ð ?ð ?ð ?ð" €ˆE˜ DÐ)Ñ)Ô)ðEð Eð Eð Eð Eñ Eô Eñ *Ô)ðEð,Kð Kð Kð Kð  €ˆE˜$ dÐ+Ñ+Ô+ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ ,Ô+ð
ð2	3ð 	3ð 	3ð	4ð 	4ð 	4ð	4ð 	4ð 	4ð	3ð 	3ð 	3ð €ˆE˜$ dÐ+Ñ+Ô+ð<ð <ð <ð <ð <ñ <ô <ñ ,Ô+ð<ð$	'ð 	'ð 	'ð €ˆE˜$ dÐ+Ñ+Ô+ð<ð <ð <ð <ð <ñ <ô <ñ ,Ô+ð<ð$	'ð 	'ð 	'ð €ˆE˜ DÐ)Ñ)Ô)ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ *Ô)ð
ð4&ð &ð &ð  €ˆE˜ DÐ)Ñ)Ô)ð&
ð &
ð &
ð &
ð &
ñ &
ô &
ñ *Ô)ð&
ðR  ¨J¸	Ð+Bð 4ð 4ð 4ð 4ð 4ð 4ð 4s   ²: ºAÁA