/usr/lib64/python3.9/lib2to3/__pycache__
NameSizeModeActions
btm_matcher.cpython-39.opt-1.pyc48770644editdlrm
btm_matcher.cpython-39.opt-2.pyc33060644editdlrm
btm_matcher.cpython-39.pyc48770644editdlrm
btm_utils.cpython-39.opt-1.pyc61480644editdlrm
btm_utils.cpython-39.opt-2.pyc46360644editdlrm
btm_utils.cpython-39.pyc61480644editdlrm
fixer_base.cpython-39.opt-1.pyc62550644editdlrm
fixer_base.cpython-39.opt-2.pyc35040644editdlrm
fixer_base.cpython-39.pyc62550644editdlrm
fixer_util.cpython-39.opt-1.pyc121700644editdlrm
fixer_util.cpython-39.opt-2.pyc100070644editdlrm
fixer_util.cpython-39.pyc121700644editdlrm
main.cpython-39.opt-1.pyc86710644editdlrm
main.cpython-39.opt-2.pyc69180644editdlrm
main.cpython-39.pyc86890644editdlrm
patcomp.cpython-39.opt-1.pyc53890644editdlrm
patcomp.cpython-39.opt-2.pyc48810644editdlrm
patcomp.cpython-39.pyc56050644editdlrm
pygram.cpython-39.opt-1.pyc12620644editdlrm
pygram.cpython-39.opt-2.pyc10570644editdlrm
pygram.cpython-39.pyc12620644editdlrm
pytree.cpython-39.opt-1.pyc236720644editdlrm
pytree.cpython-39.opt-2.pyc149690644editdlrm
pytree.cpython-39.pyc242950644editdlrm
refactor.cpython-39.opt-1.pyc206130644editdlrm
refactor.cpython-39.opt-2.pyc165670644editdlrm
refactor.cpython-39.pyc206430644editdlrm
__init__.cpython-39.opt-1.pyc3020644editdlrm
__init__.cpython-39.opt-2.pyc3020644editdlrm
__init__.cpython-39.pyc3020644editdlrm
__main__.cpython-39.opt-1.pyc2150644editdlrm
__main__.cpython-39.opt-2.pyc2150644editdlrm
__main__.cpython-39.pyc2150644editdlrm
Edit: /usr/lib64/python3.9/lib2to3/__pycache__/main.cpython-39.opt-2.pyc (6918B)
a ´iN.ã@s|ddlmZmZddlZddlZddlZddlZddlZddlZddl m Z dd„Z Gdd„de j ƒZ d d „Zd d d „ZdS)é)Úwith_statementÚprint_functionNé)Úrefactorc Cs(| ¡}| ¡}tj||||dddd�S)Nz (original)z (refactored)Ú)Zlineterm)Ú splitlinesÚdifflibZ unified_diff)ÚaÚbÚfilename©r ú$/usr/lib64/python3.9/lib2to3/main.pyÚ diff_textss  þrcs:eZdZd ‡fdd„ Zdd„Z‡fdd„Zdd „Z‡ZS) ÚStdoutRefactoringToolrc sP||_||_|r&| tj¡s&|tj7}||_||_||_tt |ƒ  |||¡dS©N) Ú nobackupsÚ show_diffsÚendswithÚosÚsepÚ_input_base_dirÚ _output_dirÚ_append_suffixÚsuperrÚ__init__) ÚselfZfixersÚoptionsÚexplicitrrÚinput_base_dirÚ output_dirÚ append_suffix©Ú __class__r r r$s zStdoutRefactoringTool.__init__cOs0|j |||f¡|jj|g|¢Ri|¤ŽdSr)ÚerrorsÚappendÚloggerÚerror)rÚmsgÚargsÚkwargsr r r Ú log_errorAszStdoutRefactoringTool.log_errorc sZ|}|jrH| |j¡r6tj |j|t|jƒd…¡}ntd||jfƒ‚|jrX||j7}||kr”tj  |¡}tj  |¡s†|r†t  |¡|  d||¡|j �s|d}tj |¡rÞzt |¡WntyÜ|  d|¡Yn0zt ||¡Wn"t�y|  d||¡Yn0tt|ƒj}|||||ƒ|j �s@t ||¡||k�rVt ||¡dS)Nz5filename %s does not start with the input_base_dir %szWriting converted %s to %s.z.bakzCan't remove backup %szCan't rename %s to %s)rÚ startswithrrÚpathÚjoinÚlenÚ ValueErrorrÚdirnameÚisdirÚmakedirsÚ log_messagerÚlexistsÚremoveÚOSErrorÚrenamerrÚ write_fileÚshutilÚcopymode) rZnew_textr Zold_textÚencodingZ orig_filenamerZbackupÚwriter!r r r8EsH  ÿÿÿ   ÿ     z StdoutRefactoringTool.write_filecCs¼|r| d|¡n¦| d|¡|jr¸t|||ƒ}zd|jdur€|j�,|D] }t|ƒqHtj ¡Wdƒq’1st0Yn|D] }t|ƒq„Wn"ty¶t d|fƒYdS0dS)NzNo changes to %sz Refactored %sz+couldn't encode %s's diff for your terminal) r3rrZ output_lockÚprintÚsysÚstdoutÚflushÚUnicodeEncodeErrorÚwarn)rÚoldÚnewr ZequalZ diff_linesÚliner r r Ú print_outputls$    * ÿz"StdoutRefactoringTool.print_output)rrr)Ú__name__Ú __module__Ú __qualname__rr*r8rFÚ __classcell__r r r!r rs  ÿ 'rcCstd|ftjd�dS)Nz WARNING: %s©Úfile)r=r>Ústderr)r'r r r rB�srBc stjdd�}|jddddd�|jdd d gd d �|jd dddddd�|jddd gdd �|jddddd�|jddddd�|jddddd�|jd d!dd"d�|jd#dd$d�|jd%d&dd'd�|jd(d)dd*d+d �|jd,d-dd.d/d0d1�|jd2d3dd4d�|jd5dd.d/d6d1�d*}i}| |¡\}}|j�rRd7|d8<|j�sLtd9ƒd7|_|j�rl|j�sl|  d:¡|j �r†|j�s†|  d;¡|j�sž|j �ržtd<ƒ|j�s¸|j�r¸|  d=¡|j �rìt d>ƒt ˆ¡D]}t |ƒ�qÒ|�sìd?S|�st d@tjdA�t dBtjdA�dCSdD|v�r:d7}|j�r:t dEtjdA�dCS|j�rJd7|dF<|j�rZd7|dG<|j�rhtjntj}tjdH|dI�t dJ¡}tt ˆ¡ƒ} t‡fdKdL„|jDƒƒ} tƒ} |j�rd*} |jD](} | dMk�rØd7} n|  ˆdN| ¡�qÄ| �rþ|  | ¡n| }n |  | ¡}|  | ¡}t!j" #|¡}|�rR| $t!j%¡�sRt!j" &|¡�sRt!j" '|¡}|j�rv| (t!j%¡}| )dO|j|¡t*t+|ƒ|t+| ƒ|j|j ||j|j dP�}|j,�s|�r¸| -¡nBz| ||j|j.|j/¡Wn&tj0�yøt dQtjdA�YdS0| 1¡t2t3|j,ƒƒS)RNz2to3 [options] file|dir ...)Úusagez-dz--doctests_onlyÚ store_truezFix up doctests only)ÚactionÚhelpz-fz--fixr$z1Each FIX specifies a transformation; default: all)rPÚdefaultrQz-jz --processesÚstorerÚintzRun 2to3 concurrently)rPrRÚtyperQz-xz--nofixz'Prevent a transformation from being runz-lz --list-fixeszList available transformationsz-pz--print-functionz0Modify the grammar so that print() is a functionz-ez--exec-functionz/Modify the grammar so that exec() is a functionz-vz --verbosezMore verbose loggingz --no-diffsz#Don't show diffs of the refactoringz-wz--writezWrite back modified filesz-nz --nobackupsFz&Don't write backups for modified filesz-oz --output-dirÚstrrzXPut output files in this directory instead of overwriting the input files. Requires -n.)rPrUrRrQz-Wz--write-unchanged-fileszYAlso write files even if no changes were required (useful with --output-dir); implies -w.z --add-suffixzuAppend this string to all output filenames. Requires -n if non-empty. ex: --add-suffix='3' will generate .py3 files.TÚwrite_unchanged_filesz&--write-unchanged-files/-W implies -w.z%Can't use --output-dir/-o without -n.z"Can't use --add-suffix without -n.z@not writing files and not printing diffs; that's not very usefulzCan't use -n without -wz2Available transformations for the -f/--fix option:rz1At least one file or directory argument required.rKzUse --help to show usage.éú-zCan't write to stdin.rÚ exec_functionz%(name)s: %(message)s)ÚformatÚlevelz lib2to3.mainc3s|]}ˆd|VqdS)ú.fix_Nr )Ú.0Úfix©Ú fixer_pkgr r Ú âózmain..Úallr]z7Output in %r will mirror the input directory %r layout.)rrr z+Sorry, -j isn't supported on this platform.)4ÚoptparseZ OptionParserZ add_optionÚ parse_argsrWr<rBrrr&Z add_suffixZno_diffsZ list_fixesr=rZget_all_fix_namesr>rMrrZÚverboseÚloggingÚDEBUGÚINFOÚ basicConfigÚ getLoggerÚsetZget_fixers_from_packageZnofixr_ÚaddÚunionÚ differencerr,Ú commonprefixrrr1r0ÚrstripÚinforÚsortedr#Úrefactor_stdinZ doctests_onlyÚ processesZMultiprocessingUnsupportedZ summarizerTÚbool)rar(ÚparserruÚflagsrZfixnamer\r%Z avail_fixesZunwanted_fixesrZ all_presentr_Z requestedZ fixer_namesrZrtr r`r Úmain…sø  ÿ ÿ ÿ ÿ ÿ ÿ ÿ ÿÿ ÿ ÿ ÿ ÿ ÿ            ÿ  ÿ û ÿÿrz)N)Z __future__rrr>rrrhr9rerrrZMultiprocessRefactoringToolrrBrzr r r r Ús  g