选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
ó {fc@€sÞdZddlmZdZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z ddl mZmZmZddlmZdd lmZmZdd lmZdd lmZed „Zd efd„ƒYZd„Zd„Zd„Z d„Z!ej"ddfkrgddl#Z#e#j$Z%d„Z&d„Z'ne$Z%e!Z&e!Z'd„Z(defd„ƒYZ)de*fd„ƒYZ+defd„ƒYZ,de+fd„ƒYZ-dS( sÛRefactoring framework. Used as a main program, this can refactor any number of files and/or recursively descend down directories. Imported as a module, this provides infrastructure to write your own refactoring tool. iÿÿÿÿ(twith_statements#Guido van Rossum N(tchaini(tdriverttokenizettoken(t find_root(tpytreetpygram(t btm_utils(t btm_matchercC€szt|ggdgƒ}g}xUtj|jƒD]A\}}}|jdƒr1|rb|d}n|j|ƒq1q1W|S(sEReturn a sorted list of all available fix names in the given package.t*tfix_i(t __import__tpkgutilt iter_modulest__path__t startswithtappend(t fixer_pkgt remove_prefixtpkgt fix_namestfindertnametispkg((s(/usr/lib64/python2.7/lib2to3/refactor.pytget_all_fix_names"s" t _EveryNodecB€seZRS((t__name__t __module__(((s(/usr/lib64/python2.7/lib2to3/refactor.pyR.scC€sßt|tjtjfƒrC|jdkr3t‚nt|jgƒSt|tjƒrt|j rkt |j ƒSt‚nt|tj ƒrËtƒ}x5|j D]*}x!|D]}|j t |ƒƒq¦Wq™W|St d|ƒ‚dS(sf Accepts a pytree Pattern Node and returns a set of the pattern types which will match first. s$Oh no! I don't understand pattern %sN(t isinstanceRt NodePatternt LeafPatternttypetNoneRtsettNegatedPatterntcontentt_get_head_typestWildcardPatterntupdatet Exception(tpattrtptx((s(/usr/lib64/python2.7/lib2to3/refactor.pyR%2s      cC€stjtƒ}g}x£|D]›}|jr„yt|jƒ}Wntk r^|j|ƒq·XxU|D]}||j|ƒqfWq|jdk rª||jj|ƒq|j|ƒqWx:t t j j j ƒt j jƒD]}||j|ƒqÝWt|ƒS(s^ Accepts a list of fixers and returns a dictionary of head node type --> fixer list. N(t collectionst defaultdicttlisttpatternR%RRt _accept_typeR!RRtpython_grammart symbol2numbert itervaluesttokenstextendtdict(t fixer_listt head_nodesteverytfixertheadst node_type((s(/usr/lib64/python2.7/lib2to3/refactor.pyt_get_headnode_dictNs"    cC€s(gt|tƒD]}|d|^qS(sN Return the fully qualified names for fixers in the package pkg_name. t.(RtFalse(tpkg_nametfix_name((s(/usr/lib64/python2.7/lib2to3/refactor.pytget_fixers_from_packagegscC€s|S(N((tobj((s(/usr/lib64/python2.7/lib2to3/refactor.pyt _identitynsiicC€s|jddƒS(Nu u (treplace(tinput((s(/usr/lib64/python2.7/lib2to3/refactor.pyt_from_system_newlinesuscC€s*tjdkr"|jdtjƒS|SdS(Ns u (tostlinesepRF(RG((s(/usr/lib64/python2.7/lib2to3/refactor.pyt_to_system_newlineswsc€sàt}tjtj|ƒjƒ‰‡fd†}ttjtjtj fƒ}t ƒ}ykxdt rÀ|ƒ\}}||kr„q]q]|tj kr¦|r�Pnt }q]|tj kr¼|dkr¼|ƒ\}}|tj ksë|dkrïPn|ƒ\}}|tj ks|dkrPn|ƒ\}}|tjkrY|dkrY|ƒ\}}nxa|tj kr¸|j|ƒ|ƒ\}}|tjks¢|dkr¦Pn|ƒ\}}q\Wq]Pq]WWntk rÕnXt|ƒS(Nc€sˆjƒ}|d|dfS(Nii(tnext(ttok(tgen(s(/usr/lib64/python2.7/lib2to3/refactor.pytadvance…s ufromu __future__uimportu(u,(R@Rtgenerate_tokenstStringIOtreadlinet frozensetRtNEWLINEtNLtCOMMENTR"tTruetSTRINGtNAMEtOPtaddt StopIteration(tsourcethave_docstringROtignoretfeaturesttptvalue((RNs(/usr/lib64/python2.7/lib2to3/refactor.pyt_detect_future_features‚sD       t FixerErrorcB€seZdZRS(sA fixer could not be loaded.(RRt__doc__(((s(/usr/lib64/python2.7/lib2to3/refactor.pyRdªstRefactoringToolcB€s!eZied6ed6ZdZdZddd„Zd„Zd„Z d„Z d„Z d „Z eed „Z eed „Zd „Zeed „Zd„Zed„Zd„Zd„Zdedd„Zdd„ZdZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(tprint_functiontwrite_unchanged_filestFixR cC€sÄ||_|pg|_|jjƒ|_|dk rI|jj|ƒn|jdretj|_ n tj |_ |jj dƒ|_ g|_ tjdƒ|_g|_t|_tj|j dtjd|jƒ|_|jƒ\|_|_g|_tjƒ|_g|_g|_ x}t!|j|jƒD]f}|j"rT|jj#|ƒq2||jkrv|jj$|ƒq2||jkr2|j j$|ƒq2q2Wt%|jƒ|_&t%|j ƒ|_'dS(sÑInitializer. Args: fixer_names: a list of fixers to import options: a dict with configuration. explicit: a list of fixers to run even if they are explicit. RgRhRftconverttloggerN((tfixerstexplicitt_default_optionstcopytoptionsR!R'Rt!python_grammar_no_print_statementtgrammarR2tgetRhterrorstloggingt getLoggerRkt fixer_logR@twroteRtDriverRRjt get_fixerst pre_ordert post_ordertfilestbmt BottomMatchertBMt bmi_pre_ordertbmi_post_orderRt BM_compatiblet add_fixerRR>tbmi_pre_order_headstbmi_post_order_heads(tselft fixer_namesRpRmR;((s(/usr/lib64/python2.7/lib2to3/refactor.pyt__init__¶s<            c C€sÝg}g}x•|jD]Š}t|iidgƒ}|jddƒd}|j|jƒrr|t|jƒ}n|jdƒ}|jdjg|D]}|j ƒ^q”ƒ}yt ||ƒ} Wn't k rìt d||fƒ‚nX| |j |jƒ} | jr?|jtk r?||jkr?|jd|ƒqn|jd |ƒ| jd krn|j| ƒq| jd kr�|j| ƒqt d | jƒ‚qWtjd ƒ} |jd| ƒ|jd| ƒ||fS(sInspects the options to load the requested patterns and handlers. Returns: (pre_order, post_order), where pre_order is the list of fixers that want a pre-order AST traversal, and post_order is the list that want post-order traversal. R R?iiÿÿÿÿt_tsCan't find %s.%ssSkipping optional fixer: %ssAdding transformation: %stpretpostsIllegal fixer order: %rt run_ordertkey(RlR trsplitRt FILE_PREFIXtlentsplitt CLASS_PREFIXtjointtitletgetattrtAttributeErrorRdRpRwRmRWt log_messaget log_debugtorderRtoperatort attrgettertsort( R‡tpre_order_fixerstpost_order_fixerst fix_mod_pathtmodRBtpartsR+t class_namet fix_classR;tkey_func((s(/usr/lib64/python2.7/lib2to3/refactor.pyRzês8/ cO€s‚dS(sCalled when an error occurs.N((R‡tmsgtargstkwds((s(/usr/lib64/python2.7/lib2to3/refactor.pyt log_errorscG€s'|r||}n|jj|ƒdS(sHook to log a message.N(Rktinfo(R‡R§R¨((s(/usr/lib64/python2.7/lib2to3/refactor.pyR™s cG€s'|r||}n|jj|ƒdS(N(Rktdebug(R‡R§R¨((s(/usr/lib64/python2.7/lib2to3/refactor.pyRšs cC€sdS(sTCalled with the old version, new version, and filename of a refactored file.N((R‡told_texttnew_texttfilenametequal((s(/usr/lib64/python2.7/lib2to3/refactor.pyt print_output!scC€sPxI|D]A}tjj|ƒr5|j|||ƒq|j|||ƒqWdS(s)Refactor a list of files and directories.N(RItpathtisdirt refactor_dirt refactor_file(R‡titemstwritet doctests_onlyt dir_or_file((s(/usr/lib64/python2.7/lib2to3/refactor.pytrefactor&s c C€sétjd}xÕtj|ƒD]Ä\}}}|jd|ƒ|jƒ|jƒxe|D]]}|jdƒ rWtjj|ƒd|krWtjj||ƒ} |j | ||ƒqWqWWg|D]} | jdƒs¿| ^q¿|(qWdS(sÄDescends down a directory and refactor every Python file found. Python files are assumed to have a .py extension. Files and subdirectories starting with '.' are skipped. tpysDescending into %sR?iN( RItextseptwalkRšRžRR²tsplitextR•Rµ( R‡tdir_nameR·R¸tpy_exttdirpathtdirnamest filenamesRtfullnametdn((s(/usr/lib64/python2.7/lib2to3/refactor.pyR´/s    cC€s�yt|dƒ}Wn'tk r<}|jd||ƒdSXztj|jƒd}Wd|jƒXt|dd|ƒ�}t |j ƒƒ|fSWdQXdS(sG Do our best to decode a Python source file correctly. trbsCan't open %s: %siNR*tencoding(NN( topentIOErrorRªR!Rtdetect_encodingRRtcloset_open_with_encodingRHtread(R‡R¯tfterrRÇ((s(/usr/lib64/python2.7/lib2to3/refactor.pyt_read_python_sourceCs cC€s|j|ƒ\}}|dkr%dS|d7}|r›|jd|ƒ|j||ƒ}|jsl||krˆ|j|||||ƒqþ|jd|ƒnc|j||ƒ}|jsÅ|rî|jrî|jt|ƒd |d|d|ƒn|jd|ƒdS( sRefactors a file.Nu sRefactoring doctests in %ssNo doctest changes in %siÿÿÿÿR·RÇsNo changes in %s( RÐR!Rštrefactor_docstringRhtprocessed_filetrefactor_stringt was_changedtunicode(R‡R¯R·R¸RGRÇtoutputttree((s(/usr/lib64/python2.7/lib2to3/refactor.pyRµSs  cC€s·t|ƒ}d|kr*tj|j_nzMy|jj|ƒ}Wn0tk ru}|jd||jj |ƒdSXWd|j|j_X||_ |j d|ƒ|j ||ƒ|S(sFRefactor a given input string. Args: data: a string holding the code to be refactored. name: a human-readable name for use in error/log messages. Returns: An AST corresponding to the refactored input stream; None if there were errors during the parse. RgsCan't parse %s: %s: %sNsRefactoring %s( RcRRqRRrt parse_stringR(Rªt __class__Rtfuture_featuresRšt refactor_tree(R‡tdataRR`R×RÏ((s(/usr/lib64/python2.7/lib2to3/refactor.pyRÓjs     cC€sÆtjjƒ}|ro|jdƒ|j|dƒ}|jsI||kr_|j|d|ƒqÂ|jdƒnS|j|dƒ}|js™|rµ|jrµ|jt |ƒd|ƒn |jdƒdS(NsRefactoring doctests in stdinssNo doctest changes in stdinsNo changes in stdin( tsyststdinRÍRšRÑRhRÒRÓRÔRÕ(R‡R¸RGRÖR×((s(/usr/lib64/python2.7/lib2to3/refactor.pytrefactor_stdin…s c C€s›x-t|j|jƒD]}|j||ƒqW|j|j|jƒƒ|j|j|jƒƒ|jj|j ƒƒ}xçt |j ƒƒrcxÎ|jj D]À}||krœ||rœ||j dtjjdtƒ|jrþ||j dtjjƒnx[t||ƒD]F}|||kr9||j|ƒnyt|ƒWntk r]qnX|jr|||jkr|qn|j|ƒ}|r|j||ƒ}|dk rU|j|ƒx9|jƒD]+}|jsäg|_n|jj|ƒqÉW|jj|j ƒƒ}x?|D]4} | |kr6g|| >> s... c C€s‡g}d}d}d}d}x+|jtƒD]}|d7}|jƒj|jƒr²|dk r„|j|j||||ƒƒn|}|g}|j|jƒ} || }q.|dk r|j||j ƒsñ|||j j ƒdkr|j |ƒq.|dk r/|j|j||||ƒƒnd}d}|j |ƒq.W|dk rz|j|j||||ƒƒndj |ƒS(sËRefactors a docstring, looking for doctests. This returns a modified version of the input string. It looks for doctests, which start with a ">>>" prompt, and may be continued with "..." prompts, as long as the "..." is indented the same as the ">>>". (Unfortunately we can't use the doctest module's parser, since, like most parsers, it is not geared towards preserving the original source.) iiu uN( R!t splitlinesRWtlstripRtPS1R6trefactor_doctesttfindtPS2trstripRR•( R‡RGR¯tresulttblockt block_linenotindenttlinenotlineti((s(/usr/lib64/python2.7/lib2to3/refactor.pyRÑ(s:        c C€sPy|j|||ƒ}Wnutk r�}|jjtjƒrmx*|D]}|jd|jdƒƒqGWn|jd|||j j |ƒ|SX|j ||ƒrLt |ƒj tƒ}||d ||d} }|djdƒsû|dcd7>>" (possibly indented), while the remaining lines start with "..." (identically indented). s Source: %su s+Can't parse docstring in %s line %s: %s: %siiÿÿÿÿi(t parse_blockR(Rkt isEnabledForRutDEBUGRšRRªRÙRRÛRÕRûRWtendswithRýtpopR( R‡RRRR¯R×RÏRRôtclipped((s(/usr/lib64/python2.7/lib2to3/refactor.pyRþSs$   .cC€s|jrd}nd}|js4|jd|ƒn1|jd|ƒx|jD]}|j|ƒqNW|jrŸ|jdƒx!|jD]}|j|ƒq…Wn|jrt|jƒdkrÍ|jdƒn|jdt|jƒƒx0|jD]"\}}}|j|||ŽqðWndS( Ntweres need to besNo files %s modified.sFiles that %s modified:s$Warnings/messages while refactoring:isThere was 1 error:sThere were %d errors:(RxR}R™RwRtR’(R‡RtfiletmessageR§R¨R©((s(/usr/lib64/python2.7/lib2to3/refactor.pyt summarizeps$      cC€s1|jj|j|||ƒƒ}tƒ|_|S(s³Parses a block into a tree. This is necessary to get correct line number / offset information in the parser diagnostics and embedded into the parse tree. (Rt parse_tokenst wrap_toksRSRÚ(R‡RRRR×((s(/usr/lib64/python2.7/lib2to3/refactor.pyR ‡s! c c€sŠtj|j||ƒjƒ}xe|D]]\}}\}}\} } } ||d7}| |d7} ||||f| | f| fVq%WdS(s;Wraps a tokenize stream to systematically modify start/end.iN(RRPt gen_linesRL( R‡RRRR5R Rbtline0tcol0tline1tcol1t line_text((s(/usr/lib64/python2.7/lib2to3/refactor.pyR‘s (cc€s¢||j}||j}|}xi|D]a}|j|ƒrN|t|ƒVn4||jƒdkrldVntd||fƒ‚|}q'Wxtr�dVq�WdS(s–Generates lines as expected by tokenize from a list of lines. This strips the first len(indent + self.PS1) characters off each line. u sline=%r, prefix=%rR‹N(RýRRR’RtAssertionErrorRW(R‡RRtprefix1tprefix2tprefixR((s(/usr/lib64/python2.7/lib2to3/refactor.pyRŸs     N(RRR@RnR”R‘R!R‰RzRªR™RšR±RºR´RÐRµRÓRßRÛRâRÒRøRýRRÑRþRR RR(((s(/usr/lib64/python2.7/lib2to3/refactor.pyRf®s:  4 (         O    +   tMultiprocessingUnsupportedcB€seZRS((RR(((s(/usr/lib64/python2.7/lib2to3/refactor.pyR³stMultiprocessRefactoringToolcB€s5eZd„Zeedd„Zd„Zd„ZRS(cO€s/tt|ƒj||Žd|_d|_dS(N(tsuperR R‰R!tqueuet output_lock(R‡R¨tkwargs((s(/usr/lib64/python2.7/lib2to3/refactor.pyR‰¹s ic C€sf|dkr(tt|ƒj|||ƒSyddl}Wntk rQt‚nX|jdk rptdƒ‚n|j ƒ|_|j ƒ|_ gt |ƒD]}|j d|jƒ^q›}z;x|D]}|jƒqÆWtt|ƒj|||ƒWd|jjƒx$t |ƒD]}|jjdƒqWx'|D]}|jƒr5|jƒq5q5Wd|_XdS(Niiÿÿÿÿs already doing multiple processesttarget(R!R Rºtmultiprocessingt ImportErrorRR"R!t RuntimeErrort JoinableQueuetLockR#txrangetProcesst_childtstartR•tputtis_alive( R‡R¶R·R¸t num_processesR&Rt processesR+((s(/usr/lib64/python2.7/lib2to3/refactor.pyRº¾s2    +     cC€so|jjƒ}xY|dk rj|\}}ztt|ƒj||ŽWd|jjƒX|jjƒ}qWdS(N(R"RsR!R!R Rµt task_done(R‡ttaskR¨R$((s(/usr/lib64/python2.7/lib2to3/refactor.pyR-Ûs cO€sE|jdk r(|jj||fƒntt|ƒj||ŽSdS(N(R"R!R/R!R Rµ(R‡R¨R$((s(/usr/lib64/python2.7/lib2to3/refactor.pyRµæs(RRR‰R@RºR-Rµ(((s(/usr/lib64/python2.7/lib2to3/refactor.pyR ·s    (.Ret __future__Rt __author__RIR RÝRuRœR-RQt itertoolsRtpgen2RRRt fixer_utilRR‹RRRtbuR R~RWRR(RR%R>RCREt version_infotcodecsRÈRÌRHRKRcRdtobjectRfRR (((s(/usr/lib64/python2.7/lib2to3/refactor.pyt sH                 (ÿÿ