U
    eF                     @   sN   d Z ddlZdZdZdZdZdZdZd	Zd
Z	G dd dej
ejZeZdZdS )z
Constants
~~~~~~~~~
    N)
	ATTR_NAMEATTR_ALIASES	ATTR_ARGSATTR_WRAPPED_EXCEPTIONS!ATTR_WRAPPED_EXCEPTIONS_PROCESSORATTR_EXPECTS_NAMESPACE_OBJECTPARSER_FORMATTERDEFAULT_ARGUMENT_TEMPLATEDEST_FUNCTIONCustomFormatterZ	argh_nameZargh_aliasesZ	argh_argsZargh_wrap_errorsZargh_wrap_errors_processorZargh_expects_namespace_objectfunctionc                   @   s   e Zd ZdZdd ZdS )r   z
    A slightly customised :class:`argparse.ArgumentDefaultsHelpFormatter`
    + :class:`argparse.RawDescriptionHelpFormatter`.
    c                 C   s   t t|| jd}t|D ]}|| tjkr||= qt|D ] }t|| dr<|| j||< q<|ddk	rd	dd |d D }||d< d|kr|d dkrd	|d< nt
|d |d< | || S )
a_  
        This method is copied verbatim from ArgumentDefaultsHelpFormatter with
        a couple of lines added just before the end.  Reason: we need to
        `repr()` default values instead of simply inserting them as is.
        This helps notice, for example, an empty string as the default value;
        moreover, it prevents breaking argparse due to logical quirks inside
        of its formatters.

        Ideally this could be achieved by simply defining
        :attr:`DEFAULT_ARGUMENT_TEMPLATE` as ``{default!r}`` but unfortunately
        argparse only supports the old printf syntax.
        )prog__name__choicesNz, c                 S   s   g | ]}t |qS  )str).0cr   r   m/mounts/lovelace/software/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/argh/constants.py
<listcomp>]   s     z0CustomFormatter._expand_help.<locals>.<listcomp>default-)dictvars_proglistargparseSUPPRESShasattrr   getjoinrepr_get_help_string)selfactionparamsnamechoices_strr   r   r   _expand_helpH   s    
zCustomFormatter._expand_helpN)r   
__module____qualname____doc__r(   r   r   r   r   r   @   s   r   z%(default)s)r+   r   __all__r   r   r   r   r   r   r
   ArgumentDefaultsHelpFormatterRawDescriptionHelpFormatterr   r   r	   r   r   r   r   <module>
   s    
 1