ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyc

�
�Rec@@sdZddlmZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZmZddlmZeje�Zd	ejfd
��YZdefd��YZd
ejfd��YZdefd��YZd�ZdS(sBase option parser setupi(tabsolute_importN(t	strtobool(tstring_types(t
UNKNOWN_ERROR(t
ConfigurationtConfigurationError(tget_terminal_sizetPrettyHelpFormattercB@s\eZdZd�Zd�Zddd�Zd�Zd�Zd�Zd	�Z	d
�Z
RS(s4A prettier/less verbose help formatter for optparse.cO@sCd|d<d|d<t�dd|d<tjj|||�dS(Nitmax_help_positionitindent_incrementiitwidth(RtoptparsetIndentedHelpFormattert__init__(tselftargstkwargs((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyR
s

cC@s
|j|�S(N(t_format_option_strings(Rtoption((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytformat_option_strings!ss <{}>s, cC@s�g}|jr&|j|jd�n|jrF|j|jd�nt|�dkrk|jd|�n|j�r�|jp�|jj�}|j|j	|j���ndj
|�S(s�
        Return a comma-separated list of option strings and metavars.

        :param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
        :param mvarfmt: metavar format string
        :param optsep:  separator
        iit(t_short_optstappendt
_long_optstlentinsertttakes_valuetmetavartdesttlowertformattjoin(RRtmvarfmttoptseptoptsR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyR$s		cC@s|dkrdS|dS(NtOptionsRs:
((Rtheading((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytformat_heading;scC@s(dj|jtj|�d��}|S(sz
        Ensure there is only one newline between usage and the first heading
        if there is no description.
        s
Usage: {}
s  (Rtindent_linesttextwraptdedent(Rtusagetmsg((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytformat_usage@scC@s{|rst|jd�r!d}nd}|jd�}|j�}|jtj|�d�}dj||�}|SdSdS(NtmaintCommandstDescriptions
s  s{}:
{}
R(thasattrtparsertlstriptrstripR&R'R(R(Rtdescriptiontlabel((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytformat_descriptionIs	cC@s|r
|SdSdS(NR((Rtepilog((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyt
format_epilog[scC@s3g|jd�D]}||^q}dj|�S(Ns
(tsplitR(Rttexttindenttlinet	new_lines((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyR&bs&(t__name__t
__module__t__doc__R
RRR%R+R5R7R&(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRs							tUpdatingDefaultsHelpFormattercB@seZdZd�ZRS(s�Custom help formatter for use in ConfigOptionParser.

    This is updates the defaults before expanding them, allowing
    them to show up correctly in the help listing.
    cC@s;|jdk	r(|jj|jj�ntjj||�S(N(R0tNonet_update_defaultstdefaultsRRtexpand_default(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRDns(R=R>R?RD(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyR@gstCustomOptionParsercB@s eZd�Zed��ZRS(cO@s6|j||�}|jj�|jj||�|S(s*Insert an OptionGroup at a given position.(tadd_option_groupt
option_groupstpopR(RtidxRRtgroup((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytinsert_option_groupvs
cC@s2|j}x!|jD]}|j|j�qW|S(s<Get a list of all options, including those in option groups.(toption_listRGtextend(Rtresti((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytoption_list_alls
(R=R>RKtpropertyRP(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyREts		tConfigOptionParsercB@sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(ssCustom option parser which updates its defaults by checking the
    configuration files and environmental variablescO@s\|jd�|_|jdt�}t|�|_|jsBt�tjj|||�dS(Ntnametisolated(	RHRStFalseRtconfigtAssertionErrorRtOptionParserR
(RRRRT((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyR
�s
cC@sLy|j||�SWn1tjk
rG}dj|�GHtjd�nXdS(Ns*An error occurred during configuration: {}i(tcheck_valueRtOptionValueErrorRtsystexit(RRtkeytvaltexc((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyt
check_default�s
cc@s�d|jdg}d�|D�}xw|jj�D]f\}}|sZtjd|�q2n|jdd�\}}||kr2||j||f�q2q2Wx4|D],}x#||D]\}}||fVq�Wq�WdS(Ntglobals:env:cS@si|]}g|�qS(((t.0RS((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pys
<dictcomp>�s	s7Ignoring configuration key '%s' as it's value is empty.t.i(RSRVtitemstloggertdebugR8R(Rtoverride_ordert
section_itemstsection_keyR^tsectionR]((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyt _get_ordered_configuration_items�s
cC@s�tj|j�|_t�}xy|j�D]k\}}|jd|�}|dkr\q+n|jdkr�yt	|�}Wq�t
k
r�t|j||�}|j|�q�Xn�|jdkr�|j
�}g|D]}|j|||�^q�}n�|jdkrt|j|j�|j�}|j||�}|jpCd	}	|jpRi}
|j|||||	|
�n|j|||�}|||j<q+Wx$|D]}t|j|�||<q�Wd|_|S(
s�Updates the given defaults with values from the config files and
        the environ. Does a little special handling for certain types of
        options (lists).s--t
store_truetstore_falsetcountRtcallbackN(RlRmRn((RtValuesRCtvaluestsetRkt
get_optionRAtactionRt
ValueErrortinvalid_config_error_messageterrorR8R`taddRtget_opt_stringt
convert_valuet
callback_argstcallback_kwargsRotgetattr(RRCt	late_evalR]R^Rt	error_msgtvtopt_strRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRB�s:	
+
	cC@s�|jstj|j�Sy|jj�Wn)tk
rU}|jtt	|��nX|j
|jj��}x]|j�D]O}|j
|j�}t|t�r{|j�}|j||�||j<q{q{Wtj|�S(s�Overriding to make updating the defaults after instantiation of
        the option parser possible, _update_defaults() does the dirty work.(tprocess_default_valuesRRpRCRVtloadRR\RtstrRBtcopyt_get_all_optionstgetRt
isinstanceRRyRY(RterrRCRtdefaultR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pytget_default_values�s	 cC@s-|jtj�|jtdj|��dS(Ns{}
(tprint_usageR[tstderrR\RR(RR*((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRw�s(	R=R>R?R
R`RkRBR�Rw(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRR�s					1	cC@s,|dkrdj||�Sdj||�S(sQReturns a better error message when invalid configuration option
    is provided.RlRmso{0} is not a valid value for {1} option, please specify a boolean value like yes/no, true/false or 1/0 instead.s[{0} is not a valid value for {1} option, please specify a numerical value like 1/0 instead.(RlRm(R(RtR]R^((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyRvs

(R?t
__future__RtloggingRR[R'tdistutils.utilRtpip._vendor.sixRtpip._internal.cli.status_codesRtpip._internal.configurationRRtpip._internal.utils.compatRt	getLoggerR=ReRRR@RXRERRRv(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/parser.pyt<module>s P
w

Zerion Mini Shell 1.0