GRAYBYTE WORDPRESS FILE MANAGER7141

Server IP : 162.254.39.133 / Your IP : 216.73.216.176
System : Linux premium287.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
PHP Version : 8.1.33
Disable Function : mail
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/lib64/python2.7/lib2to3/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib64/python2.7/lib2to3//fixer_util.pyc
�
{fc@sdZddlmZddlmZddlmZmZddlm	Z
ddlmZd�Z
d	�Zd
�Zd�Zd5d�Zd
�Zd�Zd�Ze�e�d�Zd5d5d�Zd�Zd�Zd5d�Zd�Zd5d�Zd5d�Zd�Zd�Zd�Z d�Z!e"ddddd d!d"d#d$d%g
�Z#d&�Z$d'a%d(a&d)a'e(a)d*�Z*d+�Z+d,�Z,d-�Z-d.�Z.d/�Z/d0�Z0d1�Z1e"e
j2e
j3g�Z4d5d2�Z5e"e
j3e
j2e
j6g�Z7d3�Z8d5d4�Z9d5S(6s1Utility functions, node construction macros, etc.i����(tislicei(ttoken(tLeaftNode(tpython_symbols(tpatcompcCs%ttj|ttjd�|g�S(Nu=(RtsymstargumentRRtEQUAL(tkeywordtvalue((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt
KeywordArgs	cCsttjd�S(Nu((RRtLPAR(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytLParenscCsttjd�S(Nu)(RRtRPAR(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytRParenscCslt|t�s|g}nt|t�s?d|_|g}nttj|ttjddd�g|�S(sBuild an assignment statementu u=tprefix(	t
isinstancetlistRRRtatomRRR(ttargettsource((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytAssigns		cCsttj|d|�S(sReturn a NAME leafR(RRtNAME(tnameR((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytName&scCs|ttjt�|g�gS(sA node tuple for obj.attr(RRttrailertDot(tobjtattr((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytAttr*scCsttjd�S(sA comma leafu,(RRtCOMMA(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytComma.scCsttjd�S(sA period (.) leafu.(RRtDOT(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR2scCsMttj|j�|j�g�}|rI|jdttj|��n|S(s-A parenthesised argument list, used by Call()i(RRRtclonetinsert_childtarglist(targstlparentrparentnode((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytArgList6s$cCs:ttj|t|�g�}|dk	r6||_n|S(sA function callN(RRtpowerR)tNoneR(t	func_nameR%RR(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytCall=scCsttjd�S(sA newline literalu
(RRtNEWLINE(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytNewlineDscCsttjd�S(sA blank lineu(RRR.(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt	BlankLineHscCsttj|d|�S(NR(RRtNUMBER(tnR((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytNumberLscCs1ttjttjd�|ttjd�g�S(sA numeric or string subscriptu[u](RRRRRtLBRACEtRBRACE(t
index_node((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt	SubscriptOscCsttj|d|�S(s
A string leafR(RRtSTRING(tstringR((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytStringUsc	Csd|_d|_d|_ttjd�}d|_ttjd�}d|_||||g}|r�d|_ttjd�}d|_|jttj||g��nttj|ttj	|�g�}ttj
ttjd�|ttjd�g�S(suA list comprehension of the form [xp for fp in it if test].

    If test is None, the "if test" part is omitted.
    uu uforuinuifu[u](
RRRRtappendRRtcomp_ift	listmakertcomp_forRR4R5(	txptfptitttesttfor_leaftin_leaft
inner_argstif_leaftinner((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytListCompYs$							"$	cCsx|D]}|j�qWttjd�ttj|dd�ttjddd�ttj|�g}ttj|�}|S(sO Return an import statement in the form:
        from package import name_leafsufromRu uimport(tremoveRRRRRtimport_as_namestimport_from(tpackage_namet
name_leafstleaftchildrentimp((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt
FromImportqs
cCs�t|t�r.|jt�t�gkr.tSt|t�o�t|j�dko�t|jdt�o�t|jdt�o�t|jdt�o�|jdjdko�|jdjdkS(s(Does the node represent a tuple literal?iiiiu(u)(	RRROR
RtTruetlenRR
(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_tuple�s*cCszt|t�oyt|j�dkoyt|jdt�oyt|jdt�oy|jdjdkoy|jdjdkS(s'Does the node represent a list literal?iii����u[u](RRRSRORR
(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_list�scCsttjt�|t�g�S(N(RRRR
R(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytparenthesize�stsortedRtsettanytallttupletsumtmintmaxt	enumerateccs4t||�}x|r/|Vt||�}qWdS(slFollow an attribute chain.

    If you have a chain of objects where a.foo -> b, b.foo-> c, etc,
    use this to iterate over all objects in the chain. Iteration is
    terminated by getattr(x, attr) is None.

    Args:
        obj: the starting object
        attr: the name of the chaining attribute

    Yields:
        Each successive object in the chain.
    N(tgetattr(RRtnext((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt
attr_chain�s	sefor_stmt< 'for' any 'in' node=any ':' any* >
        | comp_for< 'for' any 'in' node=any any* >
     s�
power<
    ( 'iter' | 'list' | 'tuple' | 'sorted' | 'set' | 'sum' |
      'any' | 'all' | 'enumerate' | (any* trailer< '.' 'join' >) )
    trailer< '(' node=any ')' >
    any*
>
s`
power<
    ( 'sorted' | 'enumerate' )
    trailer< '(' arglist<node=any any*> ')' >
    any*
>
cCs�ts<tjt�atjt�atjt�atantttg}xRt|t|d��D]8\}}i}|j	||�rd|d|krdtSqdWt
S(s Returns true if node is in an environment where all that is required
        of it is being iterable (ie, it doesn't matter if it returns a list
        or an iterator).
        See test_map_nochange in test_fixers.py for some examples and tests.
        tparentR((t
pats_builtRtcompile_patterntp0tp1tp2RRtzipRbtmatchtFalse(R(tpatternstpatternRctresults((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytin_special_context�s	%"cCs�|j}|dk	r+|jtjkr+tS|j}|jtjtj	fkrStS|jtj
kr||jd|kr|tS|jtjks�|jtj
kr�|dk	r�|jtjks�|jd|kr�tStS(sG
    Check that something isn't an attribute or function name etc.
    iN(tprev_siblingR+ttypeRR!RkRcRtfuncdeftclassdeft	expr_stmtROt
parameterst
typedargslistRRR(R(tprevRc((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_probably_builtin�s		%cCspxi|dk	rk|jtjkr_t|j�dkr_|jd}|jtjkr_|jSn|j	}qWdS(sFind the indentation of *node*.iiuN(
R+RqRtsuiteRSRORtINDENTR
Rc(R(tindent((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytfind_indentation�s'


cCsW|jtjkr|S|j�}|jd}|_ttj|g�}||_|S(N(RqRRyR"RcR+R(R(RcRy((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt
make_suites	cCs;x4|jtjkr6|j}|std��qqW|S(sFind the top level namespace.s,root found before file_input node was found.(RqRt
file_inputRct
ValueError(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt	find_roots
	cCs"t|t|�|�}t|�S(s� Returns true if name is imported from package at the
        top level of the tree which node belongs to.
        To cover the case of an import like 'import foo', use
        None for the package and 'foo' for the name. (tfind_bindingR�tbool(tpackageRR(tbinding((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytdoes_tree_importscCs|jtjtjfkS(s0Returns true if the node is an import statement.(RqRtimport_nameRK(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt	is_import"scCs�d�}t|�}t|||�r+dSd}}xnt|j�D]]\}}||�scqEnx1t|j|�D]\}}||�swPqwqwW||}PqEW|dkrxbt|j�D]N\}}|jtjkr�|jr�|jdjtjkr�|d}Pq�q�Wn|dkr\t
tjttj
d�ttj
|dd�g�}	n$t|ttj
|dd�g�}	|	t�g}
|j|t
tj|
��dS(s\ Works like `does_tree_import` but adds an import statement
        if it was not imported. cSs,|jtjko+|jo+t|jd�S(Ni(RqRtsimple_stmtROR�(R(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pytis_import_stmt)sNiiuimportRu (R�R�R_RORqRR�RR8R+RR�RRRQR/R#(R�RR(R�troott
insert_postoffsettidxtnode2timport_RO((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyttouch_import&s4	
 

	!$cCsKxD|jD]9}d}|jtjkrst||jd�rB|St|t|jd�|�}|r |}q n�|jtjtj	fkr�t|t|jd�|�}|r |}q na|jtj
kr|t|t|jd�|�}|r�|}q xt|jd�D]b\}}|jtj
kr|jdkrt|t|j|d�|�}|ru|}quqqWn�|jtkr�|jdj|kr�|}nvt|||�r�|}n[|jtjkr�t|||�}n4|jtjkr t||jd�r |}q n|r
|s0|St|�rC|Sq
q
WdS(	s� Returns the node which binds variable name, otherwise None.
        If optional argument package is supplied, only imports will
        be returned.
        See test cases for examples.ii����iit:iiN(ROR+RqRtfor_stmtt_findR�R}tif_stmtt
while_stmtttry_stmtR_RtCOLONR
t	_def_symst_is_import_bindingR�RtR�(RR(R�tchildtretR2titkid((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR�TsH	 !#%		cCs||g}xl|rw|j�}|jdkrO|jtkrO|j|j�q|jtjkr|j|kr|SqWdS(Ni(	tpopRqt_block_symstextendRORRR
R+(RR(tnodes((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR�s		!cCs'|jtjkr|r|jd}|jtjkr�x�|jD]Z}|jtjkrw|jdj|kr�|SqB|jtjkrB|j|krB|SqBWq#|jtjkr�|jd}|jtjkr|j|kr|Sq#|jtjkr#|j|kr#|Sn|jtj	kr#|rMt
|jd�j�|krMdS|jd}|rst
d|�rsdS|jtjkr�t
||�r�|S|jtjkr�|jd}|jtjkr |j|kr |Sq#|jtjkr|j|kr|S|r#|jtjkr#|SndS(s� Will reuturn node if node will import name, or node
        will import * from package.  None is returned otherwise.
        See test cases for examples. iii����iuasN(RqRR�ROtdotted_as_namestdotted_as_nameR
RRRKtunicodetstripR+R�RJtimport_as_nametSTAR(R(RR�RPR�tlastR2((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyR��s@
!
!!%
!
!!N(:t__doc__t	itertoolsRtpgen2RtpytreeRRtpygramRRtRRR
RRR+RRR RR)R-R/R0R3R7R:RHRQRTRURVRXtconsuming_callsRbRfRgRhRkRdRoRxR|R}R�R�R�R�RsRrR�R�RR�R�R�(((s*/usr/lib64/python2.7/lib2to3/fixer_util.pyt<module>sZ																									-*	

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 15 2024 10:33:27
root / root
0755
fixes
--
June 15 2024 10:33:27
root / root
0755
pgen2
--
June 15 2024 10:33:27
root / root
0755
Grammar.txt
6.928 KB
April 10 2024 04:58:35
root / root
0644
Grammar2.7.18.final.0.pickle
39.537 KB
April 10 2024 04:58:41
root / root
0644
PatternGrammar.txt
0.774 KB
April 10 2024 04:58:35
root / root
0644
PatternGrammar2.7.18.final.0.pickle
2.733 KB
April 10 2024 04:58:41
root / root
0644
__init__.py
0.007 KB
April 10 2024 04:58:35
root / root
0644
__init__.pyc
0.124 KB
April 10 2024 04:58:46
root / root
0644
__init__.pyo
0.124 KB
April 10 2024 04:58:46
root / root
0644
__main__.py
0.065 KB
April 10 2024 04:58:35
root / root
0644
__main__.pyc
0.236 KB
April 10 2024 04:58:46
root / root
0644
__main__.pyo
0.236 KB
April 10 2024 04:58:46
root / root
0644
btm_matcher.py
6.674 KB
April 10 2024 04:58:35
root / root
0644
btm_matcher.pyc
5.693 KB
April 10 2024 04:58:46
root / root
0644
btm_matcher.pyo
5.693 KB
April 10 2024 04:58:46
root / root
0644
btm_utils.py
9.777 KB
April 10 2024 04:58:35
root / root
0644
btm_utils.pyc
7.386 KB
April 10 2024 04:58:46
root / root
0644
btm_utils.pyo
7.386 KB
April 10 2024 04:58:46
root / root
0644
fixer_base.py
6.621 KB
April 10 2024 04:58:35
root / root
0644
fixer_base.pyc
7.018 KB
April 10 2024 04:58:46
root / root
0644
fixer_base.pyo
7.018 KB
April 10 2024 04:58:46
root / root
0644
fixer_util.py
14.255 KB
April 10 2024 04:58:35
root / root
0644
fixer_util.pyc
14.339 KB
April 10 2024 04:58:46
root / root
0644
fixer_util.pyo
14.339 KB
April 10 2024 04:58:46
root / root
0644
main.py
11.333 KB
April 10 2024 04:58:35
root / root
0644
main.pyc
9.601 KB
April 10 2024 04:58:46
root / root
0644
main.pyo
9.56 KB
April 10 2024 04:58:43
root / root
0644
patcomp.py
6.899 KB
April 10 2024 04:58:35
root / root
0644
patcomp.pyc
6.446 KB
April 10 2024 04:58:46
root / root
0644
patcomp.pyo
6.142 KB
April 10 2024 04:58:43
root / root
0644
pygram.py
1.131 KB
April 10 2024 04:58:35
root / root
0644
pygram.pyc
1.407 KB
April 10 2024 04:58:46
root / root
0644
pygram.pyo
1.407 KB
April 10 2024 04:58:46
root / root
0644
pytree.py
28.358 KB
April 10 2024 04:58:35
root / root
0644
pytree.pyc
29.593 KB
April 10 2024 04:58:46
root / root
0644
pytree.pyo
28.73 KB
April 10 2024 04:58:43
root / root
0644
refactor.py
27.369 KB
April 10 2024 04:58:35
root / root
0644
refactor.pyc
23.352 KB
April 10 2024 04:58:46
root / root
0644
refactor.pyo
23.311 KB
April 10 2024 04:58:43
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF