Ë
    zñ�j�  ã                   ó0   — d dl mZmZmZmZ  G d„ d«      Zy)é    )ÚAnyÚIterableÚOptionalÚTuplec                   ó@  — e Zd ZdZddeddddddf	dee   dee   dedee   d	ee   d
edededee   ddfd„Z	defd„Z
edee   fd„«       Zedeedf   fd„«       Zedefd„«       Zedefd„«       Zej"                  deddfd„«       Zddededdfd„Zedefd„«       Zy)ÚArgumenta\  
    A command-line argument/flag.

    :param name:
        Syntactic sugar for ``names=[<name>]``. Giving both ``name`` and
        ``names`` is invalid.
    :param names:
        List of valid identifiers for this argument. For example, a "help"
        argument may be defined with a name list of ``['-h', '--help']``.
    :param kind:
        Type factory & parser hint. E.g. ``int`` will turn the default text
        value parsed, into a Python integer; and ``bool`` will tell the
        parser not to expect an actual value but to treat the argument as a
        toggle/flag.
    :param default:
        Default value made available to the parser if no value is given on the
        command line.
    :param help:
        Help text, intended for use with ``--help``.
    :param positional:
        Whether or not this argument's value may be given positionally. When
        ``False`` (default) arguments must be explicitly named.
    :param optional:
        Whether or not this (non-``bool``) argument requires a value.
    :param incrementable:
        Whether or not this (``int``) argument is to be incremented instead of
        overwritten/assigned to.
    :param attr_name:
        A Python identifier/attribute friendly name, typically filled in with
        the underscored version when ``name``/``names`` contain dashes.

    .. versionadded:: 1.0
    N© FÚnameÚnamesÚkindÚdefaultÚhelpÚ
positionalÚoptionalÚincrementableÚ	attr_nameÚreturnc
                 ó  — |r|rt        d«      ‚|s|st        d«      ‚|rt        |«      | _        n|r
|s|f| _        || _        d }
|t        u rg }
|r|}
|
x| _        | _        || _        || _        || _	        || _
        || _        |	| _        y )Nz8Cannot give both 'name' and 'names' arguments! Pick one.z(An Argument must have at least one name.)Ú	TypeErrorÚtupler   r   ÚlistÚ	raw_valueÚ_valuer   r   r   r   r   r   )Úselfr
   r   r   r   r   r   r   r   r   Úinitial_values              úW/var/www/api.ozpay.ru/ozpay/venv/lib/python3.12/site-packages/invoke/parser/argument.pyÚ__init__zArgument.__init__*   s¡   € ñ ‘EÜØJóð ñ ™ÜÐFÓGÐGÙÜ˜u›ˆD�JÙ™%Ø˜ˆDŒJØˆŒ	Ø'+ˆà”4‰<ØˆMáØ#ˆMØ'4Ð4ˆŒ˜œØˆŒØˆŒ	Ø$ˆŒØ ˆŒØ*ˆÔØ"ˆ�ó    c                 óÈ  — d}| j                   r*dj                  dj                  | j                   «      «      }d}| j                  s| j                  rd}| j                  r|dz  }| j                  r|dz  }d}| j
                  t        k7  r%dj                  | j
                  j                  «      }dj                  | j                  j                  | j                  |||«      S )	NÚ z ({})z, ú Ú*ú?z [{}]z<{}: {}{}{}{}>)
Ú	nicknamesÚformatÚjoinr   r   r   ÚstrÚ__name__Ú	__class__r
   )r   ÚnicksÚflagsr   s       r   Ú__repr__zArgument.__repr__P   s·   € ØˆØ�>Š>Ø—N‘N 4§9¡9¨T¯^©^Ó#<Ó=ˆEØˆØ�?Š?˜dŸmšmØˆEØ�?Š?Ø�S‰LˆEØ�=Š=Ø�S‰LˆEð ˆØ�9‰9œÒØ—>‘> $§)¡)×"4Ñ"4Ó5ˆDØ×&Ñ&Ø�N‰N×#Ñ# T§Y¡Y°°t¸Uó
ð 	
r   c                 ó<   — | j                   xs | j                  d   S )zÔ
        The canonical attribute-friendly name for this argument.

        Will be ``attr_name`` (if given to constructor) or the first name in
        ``names`` otherwise.

        .. versionadded:: 1.0
        r   )r   r   ©r   s    r   r
   zArgument.named   s   € ð �~‰~Ò. §¡¨A¡Ð.r   .c                 ó    — | j                   dd  S ©Né   )r   r.   s    r   r$   zArgument.nicknamesp   s   € à�z‰z˜!˜"ˆ~Ðr   c                 óD   — | j                   t        u ry| j                  ryy)NFT)r   Úboolr   r.   s    r   Útakes_valuezArgument.takes_valuet   s    € à�9‰9œÑØØ×ÒØØr   c                 óJ   — | j                   �| j                   S | j                  S ©N)r   r   r.   s    r   ÚvaluezArgument.value|   s    € ð #Ÿk™kÐ5ˆt�{‰{ÐG¸4¿<¹<ÐGr   Úargc                 ó*   — | j                  |d¬«       y )NT)Úcast)Ú	set_value)r   r8   s     r   r7   zArgument.value�   s   € à�‰�s ˆÕ&r   r7   r:   c                 ó    ‡ — |‰ _         d„ }|r‰ j                  }‰ j                  t        u rˆ fd„}‰ j                  rˆ fd„} ||«      ‰ _        y)a!  
        Actual explicit value-setting API call.

        Sets ``self.raw_value`` to ``value`` directly.

        Sets ``self.value`` to ``self.kind(value)``, unless:

        - ``cast=False``, in which case the raw value is also used.
        - ``self.kind==list``, in which case the value is appended to
          ``self.value`` instead of cast & overwritten.
        - ``self.incrementable==True``, in which case the value is ignored and
          the current (assumed int) value is simply incremented.

        .. versionadded:: 1.0
        c                 ó   — | S r6   r	   )Úxs    r   ú<lambda>z$Argument.set_value.<locals>.<lambda>—   s   € ˜€ r   c                 ó$   •— ‰j                   | gz   S r6   ©r7   ©r>   r   s    €r   r?   z$Argument.set_value.<locals>.<lambda>�   s   ø€ ˜TŸZ™Z¨1¨#Ñ-€ r   c                 ó"   •— ‰j                   dz   S r0   rA   rB   s    €r   r?   z$Argument.set_value.<locals>.<lambda>¢   s   ø€ ˜TŸZ™Z¨!™^€ r   N)r   r   r   r   r   )r   r7   r:   Úfuncs   `   r   r;   zArgument.set_value…   sI   ø€ ð  ˆŒáˆáØ—9‘9ˆDà�9‰9œÑÛ-ˆDà×Òó ,ˆDÙ˜5“kˆ�r   c                 ól   — | j                   t        u rt        | j                  «      S | j                  duS )a/  
        Returns whether the argument was ever given a (non-default) value.

        For most argument kinds, this simply checks whether the internally
        stored value is non-``None``; for others, such as ``list`` kinds,
        different checks may be used.

        .. versionadded:: 1.3
        N)r   r   r3   r   r.   s    r   Ú	got_valuezArgument.got_value¥   s.   € ð �9‰9œÑÜ˜Ÿ™Ó$Ð$Ø�{‰{ $Ð&Ð&r   )T)r(   Ú
__module__Ú__qualname__Ú__doc__r'   r   r   r   r3   r   r,   Úpropertyr
   r   r$   r4   r7   Úsetterr;   rF   r	   r   r   r   r      s„  „ ñ ðH #Ø!ØØ!%Ø"Ø ØØ#Ø#'ñ$#à�s‰mð$#ð ˜‰}ð$#ð ð	$#ð
 ˜#‘ð$#ð �s‰mð$#ð ð$#ð ð$#ð ð$#ð ˜C‘=ð$#ð 
ó$#ðL
˜#ó 
ð( ð	/�h˜s‘mò 	/ó ð	/ð ð˜5  c ™?ò ó ðð ð˜Tò ó ðð ðH�sò Hó ðHð ‡\�\ð'˜ð ' ò 'ó ð'ñ"˜sð "¨$ð "¸$ó "ð@ ð'˜4ò 'ó ñ'r   r   N)Útypingr   r   r   r   r   r	   r   r   ú<module>rM      s   ðß 1Ó 1÷k'ò k'r   