
    wBf                     P    d Z ddlmZmZ ddlmZ  G d de      Z G d de      Zy	)
z(
Collection of custom argparse actions.
    )Action_CountAction   )NULLc                   $    e Zd Zed        ZddZy)NullCountActionc                 f    t        | |t              t        d fv rt        | ||       t        | |      S N)getattrr   setattr)	namespacenamevalues      1lib/python3.12/site-packages/conda/cli/actions.py_ensure_valuezNullCountAction._ensure_value   s0    9dD)dD\9ItU+y$''    Nc                 r    | j                  || j                  d      dz   }t        || j                  |       y )Nr      )r   destr   )selfparserr   valuesoption_string	new_counts         r   __call__zNullCountAction.__call__   s/    &&y$))Q?!C		499i0r   r
   )__name__
__module____qualname__staticmethodr   r    r   r   r   r      s    ( (
1r   r   c                   8     e Zd ZdZ	 	 	 	 	 	 d fd	ZddZ xZS )ExtendConstActionzK
    A derivative of _AppendConstAction and Python 3.8's _ExtendAction
    c
                 8    t         
|   ||d|||||||	
       y )N*)
option_stringsr   nargsconstdefaulttypechoicesrequiredhelpmetavar)super__init__)r   r%   r   r'   r(   r)   r*   r+   r,   r-   	__class__s             r   r/   zExtendConstAction.__init__   s5     	) 	 	
r   c                     t        || j                  d       }|g n|d d  }|j                  |xs | j                  g       t	        || j                  |       y r
   )r   r   extendr'   r   )r   r   r   r   r   itemss         r   r   zExtendConstAction.__call__6   sJ    	499d3mqV+

|,	499e,r   )NNNFNNr
   )r   r   r   __doc__r/   r   __classcell__)r0   s   @r   r"   r"      s&     
2-r   r"   N)r4   argparser   r   common.constantsr   r   r"   r    r   r   <module>r8      s*    * #	1l 	1"- "-r   