SILENT KILLERPanel

Current Path: > > opt > alt > python27 > lib64 > python2.7 > > lib2to3


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python27/lib64/python2.7//lib2to3

NameTypeSizeLast ModifiedActions
fixes Directory - -
pgen2 Directory - -
Grammar.txt File 7094 bytes January 08 2025 10:43:36.
Grammar2.7.18.final.0.pickle File 40486 bytes January 08 2025 10:43:36.
PatternGrammar.txt File 793 bytes January 08 2025 10:43:35.
PatternGrammar2.7.18.final.0.pickle File 2799 bytes January 08 2025 10:43:35.
__init__.py File 7 bytes January 08 2025 10:43:35.
__init__.pyc File 140 bytes January 08 2025 10:43:36.
__init__.pyo File 140 bytes January 08 2025 10:43:36.
__main__.py File 67 bytes January 08 2025 10:43:36.
__main__.pyc File 255 bytes January 08 2025 10:43:35.
__main__.pyo File 255 bytes January 08 2025 10:43:35.
btm_matcher.py File 6834 bytes January 08 2025 10:43:36.
btm_matcher.pyc File 5973 bytes January 08 2025 10:43:36.
btm_matcher.pyo File 5973 bytes January 08 2025 10:43:36.
btm_utils.py File 10012 bytes January 08 2025 10:43:35.
btm_utils.pyc File 7732 bytes January 08 2025 10:43:36.
btm_utils.pyo File 7732 bytes January 08 2025 10:43:36.
fixer_base.py File 6780 bytes January 08 2025 10:43:36.
fixer_base.pyc File 7394 bytes January 08 2025 10:43:35.
fixer_base.pyo File 7394 bytes January 08 2025 10:43:35.
fixer_util.py File 14597 bytes January 08 2025 10:43:36.
fixer_util.pyc File 15125 bytes January 08 2025 10:43:36.
fixer_util.pyo File 15125 bytes January 08 2025 10:43:36.
main.py File 11605 bytes January 08 2025 10:43:35.
main.pyc File 9961 bytes January 08 2025 10:43:35.
main.pyo File 9919 bytes January 08 2025 10:43:36.
patcomp.py File 7065 bytes January 08 2025 10:43:35.
patcomp.pyc File 6757 bytes January 08 2025 10:43:35.
patcomp.pyo File 6445 bytes January 08 2025 10:43:36.
pygram.py File 1158 bytes January 08 2025 10:43:35.
pygram.pyc File 1480 bytes January 08 2025 10:43:36.
pygram.pyo File 1480 bytes January 08 2025 10:43:36.
pytree.py File 29039 bytes January 08 2025 10:43:35.
pytree.pyc File 31291 bytes January 08 2025 10:43:36.
pytree.pyo File 30408 bytes January 08 2025 10:43:36.
refactor.py File 28026 bytes January 08 2025 10:43:35.
refactor.pyc File 24445 bytes January 08 2025 10:43:36.
refactor.pyo File 24403 bytes January 08 2025 10:43:35.

Reading File: //opt/alt/python27/lib64/python2.7//lib2to3/fixer_util.pyc

�
�V~gc@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((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pyt
KeywordArgs	cCsttjd�S(Nu((RRtLPAR(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytLParenscCsttjd�S(Nu)(RRtRPAR(((s7/opt/alt/python27/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((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytAssigns		cCsttj|d|�S(sReturn a NAME leafR(RRtNAME(tnameR((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytName&scCs|ttjt�|g�gS(sA node tuple for obj.attr(RRttrailertDot(tobjtattr((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytAttr*scCsttjd�S(sA comma leafu,(RRtCOMMA(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytComma.scCsttjd�S(sA period (.) leafu.(RRtDOT(((s7/opt/alt/python27/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((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytArgList6s$cCs:ttj|t|�g�}|dk	r6||_n|S(sA function callN(RRtpowerR)tNoneR(t	func_nameR%RR(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytCall=scCsttjd�S(sA newline literalu
(RRtNEWLINE(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytNewlineDscCsttjd�S(sA blank lineu(RRR.(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pyt	BlankLineHscCsttj|d|�S(NR(RRtNUMBER(tnR((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytNumberLscCs1ttjttjd�|ttjd�g�S(sA numeric or string subscriptu[u](RRRRRtLBRACEtRBRACE(t
index_node((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pyt	SubscriptOscCsttj|d|�S(s
A string leafR(RRtSTRING(tstringR((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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(((s7/opt/alt/python27/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(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytis_list�scCsttjt�|t�g�S(N(RRRR
R(R(((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytfind_indentation�s'


cCsW|jtjkr|S|j�}|jd}|_ttj|g�}||_|S(N(RqRRyR"RcR+R(R(RcRy((s7/opt/alt/python27/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(((s7/opt/alt/python27/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((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pytdoes_tree_importscCs|jtjtjfkS(s0Returns true if the node is an import statement.(RqRtimport_nameRK(R(((s7/opt/alt/python27/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(((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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((s7/opt/alt/python27/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�(((s7/opt/alt/python27/lib64/python2.7/lib2to3/fixer_util.pyt<module>sZ																									-*	

SILENT KILLER Tool