Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyc

ó
“tÆ_c@`súddlmZmZmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZd
„Zdefd„ƒYZd
efd„ƒYZdefd„ƒYZdefd„ƒYZde
jfd„ƒYZdS(i(tabsolute_importtdivisiontunicode_literals(t	text_type(tOrderedDict(tetreei(t
tag_regexpi(tbase(t	_ihatexmlcC`s7|dkrdSt|tƒr#|S|jddƒSdS(Nuasciiustrict(tNonet
isinstanceRtdecode(ts((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt
ensure_strs
tRootcB`s,eZd„Zd„Zd„Zd„ZRS(cC`s||_g|_yV|jjrg|jjt|t|jjƒt|jjƒt|jj	ƒƒƒnWnt
k
r{nXy|jƒ}Wnt
k
r¥|}nXx"|jƒdk	rÊ|jƒ}q©Wx,|dk	rù|jj|ƒ|jƒ}qÎWd|_d|_dS(N(telementtreetchildrentdocinfotinternalDTDtappendtDoctypeR
t	root_namet	public_idt
system_urltAttributeErrortgetroottgetpreviousR	tgetnextttextttail(tselftettnode((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__init__s*		


	cC`s|j|S(N(R(Rtkey((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__getitem__3scC`sdS(N(R	(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR6scC`sdS(Ni((R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__len__9s(t__name__t
__module__R!R#RR$(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyRs			RcB`seZd„Zd„ZRS(cC`s:||_||_||_||_d|_d|_dS(N(t	root_nodetnameRt	system_idR	RR(RR'R(RR)((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR!>s					cC`s|jjdS(Ni(R'R(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyRGs(R%R&R!R(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR=s		tFragmentRootcB`seZd„Zd„ZRS(cC`s9g|D]}t||ƒ^q|_d|_|_dS(N(tFragmentWrapperRR	RR(RRtchild((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR!Ls%cC`sdS(N(R	(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyRPs(R%R&R!R(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR*Ks	R+cB`sYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	cC`s|||_||_t|jdƒr<t|jjƒ|_n	d|_t|jdƒrot|jjƒ|_n	d|_dS(Nutextutail(R'tobjthasattrR
RR	R(Rt
fragment_rootR-((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR!Us			cC`st|j|ƒS(N(tgetattrR-(RR(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__getattr__ascC`sE|jj}|j|ƒ}|t|ƒdkr=||dSdSdS(Ni(R'RtindextlenR	(Rtsiblingstidx((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyRds
cC`s|j|S(N(R-(RR"((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR#lscC`s
t|jƒS(N(tboolR-(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__bool__oscC`sdS(N(R	(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt	getparentrscC`s
t|jƒS(N(tstrR-(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__str__uscC`s
t|jƒS(N(R9R-(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt__unicode__xscC`s
t|jƒS(N(R3R-(R((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR${s(R%R&R!R1RR#R7R8R:R;R$(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR+Ts								t
TreeWalkercB`s5eZd„Zd„Zd„Zd„Zd„ZRS(cC`skt|tƒr-t|ƒ|_t|ƒ}ntƒ|_t|ƒ}tjj||ƒt	j
ƒ|_dS(N(R
tlisttsettfragmentChildrenR*RRtNonRecursiveTreeWalkerR!Rt
InfosetFiltertfilter(Rttree((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR!€sc	C`s7t|tƒrS|\}}|d	ks7td|ƒ‚tjtt||ƒƒfSt|tƒrltjfSt|t	ƒr—tj
|j|j|j
fSt|tƒrÌt|dƒrÌtjt|jƒfS|jtjkrôtjt|jƒfS|jtjkr#tjt|jƒdd!fStjt|jƒƒ}|rV|jƒ\}}nd}t|jƒ}tƒ}x…t|jjƒƒD]n\}}t|ƒ}t|ƒ}tj|ƒ}|rè|||j dƒ|j dƒf<qŠ||d|f<qŠWtj!||j"j#|ƒ|t$|ƒdkp/|jfSdS(
Nutextutailu%Text nodes are text or tail, found %sutagiiÿÿÿÿii(utextutail(%R
ttupletAssertionErrorRtTEXTR
R0RtDOCUMENTRtDOCTYPER(RR)R+R.R-ttagRtCommenttCOMMENTRtEntitytENTITYRtmatchtgroupsR	RR=tattribtitemstgrouptELEMENTRBtfromXmlNameR3(	RR R"RNt	namespaceRItattrsR(tvalue((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pytgetNodeDetails‹s:
	"%cC`s\t|tƒstdƒ‚t|ƒs=|js=tdƒ‚|jrP|dfS|dSdS(NuText nodes have no childrenuNode has no childrenutexti(R
RDRER3R(RR ((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt
getFirstChild´s
!	
cC`sˆt|tƒrk|\}}|dks7td|ƒ‚|dkr^t|ƒrW|dSdSqk|jƒSn|jr~|dfS|jƒS(Nutextutailu%Text nodes are text or tail, found %si(utextutail(R
RDRER3R	RR(RR R"((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pytgetNextSibling½s
cC`sgt|tƒrJ|\}}|dks7td|ƒ‚|dkr]|Sn||jkr]dS|jƒS(Nutextutailu%Text nodes are text or tail, found %s(utextutail(R
RDRER?R	R8(RR R"((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt
getParentNodeÍs(R%R&R!RXRYRZR[(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyR<s
		)			N(t
__future__RRRtpip._vendor.sixRtcollectionsRtlxmlRttreebuilders.etreeRtRRR
tobjectRRR*R+R@R<(((s\/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.pyt<module>s		&	+
Back to Directory File Manager