§
    xÅj�  ã                   ó8   — d dl mZmZmZmZ  G d„ d¦  «        ZdS )é    )Ú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dS )Ú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
                 ó8  — |r|rt          d¦  «        ‚|s|st          d¦  «        ‚|rt          |¦  «        | _        n|r
|s|f| _        || _        d }
|t          u rg }
|r|}
|
x| _        | _        || _        || _        || _	        || _
        || _        |	| _        d S )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              úGC:\Projects\Historical\venv\Lib\site-packages\invoke/parser/argument.pyÚ__init__zArgument.__init__*   sÝ   € ð ð 	�Eð 	ÝØJñô ð ð ð 	H˜ð 	HÝÐFÑGÔGÐGØð 	!Ý˜u™œˆDŒJˆJØð 	!˜%ð 	!Ø˜ˆDŒJØˆŒ	Ø'+ˆà•4ˆ<ˆ<ØˆMàð 	$Ø#ˆMØ'4Ð4ˆŒ˜œØˆŒØˆŒ	Ø$ˆŒØ ˆŒØ*ˆÔØ"ˆŒˆˆó    c                 ót  — d}| j         r-d                     d                     | j         ¦  «        ¦  «        }d}| j        s| j        rd}| j        r|dz  }| j        r|dz  }d}| j        t          k    rd                     | j        j        ¦  «        }d                     | 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ð 	ØˆEØŒ?ð 	Ø�S‰LˆEØŒ=ð 	Ø�S‰LˆEð ˆØŒ9�ÒÐØ—>’> $¤)Ô"4Ñ5Ô5ˆDØ×&Ò&ØŒNÔ# T¤Y°°t¸Uñ
ô 
ð 	
r   c                 ó*   — | j         p| 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˜!˜"˜"Œ~Ðr   c                 ó8   — | j         t          u rdS | j        rdS dS )NFT)r   Úboolr   r.   s    r   Útakes_valuezArgument.takes_valuet   s)   € àŒ9�ÐÐØ�5ØÔð 	Ø�5Øˆtr   c                 ó,   — | j         �| j         n| j        S ©N)r   r   r.   s    r   ÚvaluezArgument.value|   s   € ð #œkÐ5ˆtŒ{ˆ{¸4¼<ÐGr   Úargc                 ó4   — |                       |d¬¦  «         d S )NT)Úcast)Ú	set_value)r   r8   s     r   r7   zArgument.value�   s   € à�Š�s ˆÑ&Ô&Ð&Ð&Ð&r   Tr7   r:   c                 óŒ   ‡ — |‰ _         d„ }|r‰ j        }‰ j        t          u rˆ fd„}‰ j        rˆ fd„} ||¦  «        ‰ _        dS )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¨1¨#Ñ-€ r   c                 ó   •— ‰j         dz   S r0   rA   rB   s    €r   r?   z$Argument.set_value.<locals>.<lambda>¢   s   ø€ ˜TœZ¨!™^€ r   N)r   r   r   r   r   )r   r7   r:   Úfuncs   `   r   r;   zArgument.set_value…   sk   ø€ ð  ˆŒàˆ{ˆàð 	Ø”9ˆDàŒ9�ÐÐØ-Ð-Ð-Ð-ˆDàÔð 	,ð ,Ð+Ð+Ð+ˆDØ�d˜5‘k”kˆŒˆˆr   c                 óX   — | 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�ÐÐÝ˜œÑ$Ô$Ð$ØŒ{ $Ð&Ð&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ð 	/ð 	/ð 	/ñ „Xð	/ð ð˜5  c œ?ð ð ð ñ „Xðð ð˜Tð ð ð ñ „Xðð ðH�sð Hð Hð Hñ „XðHð „\ð'˜ð ' ð 'ð 'ð 'ñ „\ð'ð"ð "˜sð "¨$ð "¸$ð "ð "ð "ð "ð@ ð'˜4ð 'ð 'ð 'ñ „Xð'ð 'ð 'r   r   N)Útypingr   r   r   r   r   r	   r   r   ú<module>rM      se   ðØ 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1ðk'ð k'ð k'ð k'ð k'ñ k'ô k'ð k'ð k'ð k'r   