ok

Mini Shell

Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyo

�
Bu�_c@sydZddlZddlZddlmZddlmZddlm	Z	e	r�ddl
mZmZm
Z
mZmZmZmZed�ZndZejd	�Zd
ddd
dgZdefd��YZdd�Zdd�Zd�Zd�Zdefd��YZd
efd��YZ defd��YZ!e	r_ee e!efZ"nd
efd��YZ#dS(s	 PEP 610 i����N(tsix(tparse(tMYPY_CHECK_RUNNING(tAnytDicttIterabletOptionaltTypetTypeVartUniontTsdirect_url.jsons.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$t	DirectUrltDirectUrlValidationErrortDirInfotArchiveInfotVcsInfocBseZRS((t__name__t
__module__(((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyRscCsl||kr|S||}tjr;|tkr;tj}nt||�shtdj|||���n|S(s3Get value from dictionary and verify expected type.s-{!r} has unexpected type for {} (expected {})(RtPY2tstrtstring_typest
isinstanceRtformat(tdt
expected_typetkeytdefaulttvalue((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt_get"s
cCs=t||||�}|dkr9tdj|���n|S(Ns{} must have a value(RtNoneRR(RRRRR((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt
_get_required3scCscg|D]}|dk	r|^q}|s:td��nt|�dkr[td��n|dS(Ns/missing one of archive_info, dir_info, vcs_infois1more than one of archive_info, dir_info, vcs_infoi(RRtlen(tinfostinfo((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt_exactly_one_of;s%cKsd�|j�D�S(s Make dict excluding None values.cSs+i|]!\}}|dk	r||�qS(N(R(t.0tktv((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pys
<dictcomp>Ms	(titems(tkwargs((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt_filter_noneJscBs8eZdZdddd�Zed��Zd�ZRS(tvcs_infocCs1||_||_||_||_||_dS(N(tvcstrequested_revisiont	commit_idtresolved_revisiontresolved_revision_type(tselfR*R,R+R-R.((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt__init__Ss
				cCsq|dkrdS|dt|td�dt|td�dt|td�dt|td�dt|td��S(NR*R,R+R-R.(RRRR(tclsR((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt
_from_dictascCs4td|jd|jd|jd|jd|j�S(NR*R+R,R-R.(R(R*R+R,R-R.(R/((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt_to_dictns				N(RRtnameRR0tclassmethodR2R3(((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyRPs
cBs2eZdZdd�Zed��Zd�ZRS(tarchive_infocCs
||_dS(N(thash(R/R7((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR0|scCs)|dkrdS|dt|td��S(NR7(RRR(R1R((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR2�scCstd|j�S(NR7(R(R7(R/((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR3�sN(RRR4RR0R5R2R3(((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyRyscBs2eZdZed�Zed��Zd�ZRS(tdir_infocCs
||_dS(N(teditable(R/R9((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR0�scCs/|dkrdS|dt|tddt��S(NR9R(RRtbooltFalse(R1R((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR2�scCstd|jpd�S(NR9(R(R9R(R/((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR3�s(RRR4R;R0R5R2R3(((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR
�s	cBseeZdd�Zd�Zed��Zd�Zed��Z	d�Z
ed��Zd�ZRS(	cCs||_||_||_dS(N(turlR!tsubdirectory(R/R<R!R=((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR0�s		cCssd|kr|S|jdd�\}}t|jt�r\|jjdkr\|dkr\|Stj|�ro|S|S(Nt@itgit(tsplitRR!RR*t
ENV_VAR_REtmatch(R/tnetloct	user_passtnetloc_no_user_pass((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt_remove_auth_from_netloc�scCsRtj|j�}|j|j�}tj|j||j|j|j	f�}|S(s�url with user:password part removed unless it is formed with
        environment variables as specified in PEP 610, or it is ``git``
        in the case of a git URL.
        (
turllib_parseturlsplitR<RFRCt
urlunsplittschemetpathtquerytfragment(R/tpurlRCtsurl((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pytredacted_url�s
$cCs|j|j��dS(N(t	from_dicttto_dict(R/((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pytvalidate�scCstdt|td�dt|td�dttjt|td��tjt|td��t	jt|td��g��S(NR<R=R!R6R8R)(
RRRRR"RR2tdictR
R(R1R((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyRQ�scCs8td|jd|j�}|jj�||jj<|S(NR<R=(R(RPR=R!R3R4(R/tres((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyRR�s
	cCs|jtj|��S(N(RQtjsontloads(R1ts((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt	from_json�scCstj|j�dt�S(Nt	sort_keys(RVtdumpsRRtTrue(R/((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pytto_json�sN(
RRRR0RFtpropertyRPRSR5RQRRRYR](((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyR�s				($t__doc__RVtretpip._vendorRtpip._vendor.six.moves.urllibRRGtpip._internal.utils.typingRttypingRRRRRRR	R
tDIRECT_URL_METADATA_NAMEtcompileRAt__all__t	ExceptionRRRRR"R(tobjectRRR
tInfoTypeR(((sP/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/direct_url.pyt<module>s44			)

Zerion Mini Shell 1.0