Edit File: pindent.pyc
� ��7ec�����������@��s���d��d�l��m�Z�d�Z�d�Z�e�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�i��Z �d �e �d�<e �d�<d!�e �d�<e �d �<d"�e �d�<d#�e �d �<d�e �d�<e �d�<e �d �<e �d�<e �d�<d$�e �d�<d%�Z �d�d&�d�������YZ�e�j�e�j �e�e�e�d���Z�e�j�e�j �e�e�e�d���Z�e�j�e�j �e�e�e�d���Z�e�e�e�d���Z�e�e�e�d���Z�e�e�e�d���Z�d����Z�e�e�e�d���Z�e�e�e�d���Z�e�e�e�d���Z�d�e����Z�d����Z�d����Z�e�d�k�r�e����n��d�S('���i����(���t���print_functioni���Nt���elift���elset���endt���ift���whilet���fort���exceptt���finallyt���tryt���witht���deft���classt���PythonIndenterc�����������B��sn���e��Z�e�j�e�j�e�e�e�d����Z�d����Z �d����Z �d����Z�d����Z�d����Z �d����Z�d����Z�d����Z�RS( ���c���������C��s|���|�|��_��|�|��_�|�|��_�|�|��_�d�|��_�|�|��_�|�j�|��_�t�j �d���|��_ �t�j �d���|��_�t�j �d���|��_�d��S(���Ni����sC���^(?:\s|\\\n)*(?P<kw>[a-z]+)((?:\s|\\\n)+(?P<id>[a-zA-Z_]\w*))?[^\w]sE���^(?:\s|\\\n)*#?\s*end\s+(?P<kw>[a-z]+)(\s+(?P<id>[a-zA-Z_]\w*))?[^\w]s���^[ \t]*( ���t���fpit���fpot ���indentsizet���tabsizet���linenot ���expandtabst���writet���_writet���ret���compilet���kwprogt���endprogt���wsprog(���t���selfR���R���R���R���R���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���__init__f���s���� c���������C��s6���|��j��r%�|��j�|�j��|��j�����n �|��j�|���d��S(���N(���R���R���R���(���R���t���line(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyR���z���s���� c���������C��s+���|��j��j����}�|�r'�|��j�d�7_�n��|�S(���Ni���(���R���t���readlineR���(���R���R���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyR�������s�����c���������G��sE���|�r�|�|�}�n��t��j�j�d�|��j�|�f���|��j�d�|���d��S(���Ns���Error at line %d: %s s���### %s ### (���t���syst���stderrR���R���(���R���t���fmtt���args(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���error����s����� c���������C��sG���|��j�����}�x4�|�d�d�k�rB�|��j�����}�|�s5�Pn��|�|�7}�q�W|�S(���Ni����s���\ (���R���(���R���R���t���line2(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���getline����s�����c���������C��s{���t��|�|��j�|��j���\�}�}�|��j�j�|���j����}�|�|�}�|�d� d�k�rj�d�|�d�|�|�}�n��|��j�|���d��S(���Ni���s��� s��� t����s��� t��� (���s��� s��� R&���(���t���divmodR���R���R���t���matchR���R���(���R���R���t���indentt���tabst���spacest���i(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���putline����s���� c���������C��s���g��}�xut��r}|��j����}�|�s%�Pn��|��j�j�|���}�|�r��d�}�|�j�d���}�|�sh�|��j�d���n&�|�j����d�|�k�r��|��j�d���n��|��j�|�t�|�����q �n��|��j �j�|���}�|�rd|�j�d���}�|�t �k�r|��j�|�t�|�����|�j�|�|�f���q �n��t�j �|���rd|�rd|��j�|�t�|���d���|�d�\�}�}�|�|�f�|�d�<q �qdn��|��j�|�t�|�����q �W|�r�|��j�d���x(�|�D]�\�}�}�|��j�d �|���q�Wn��d��S( ���NR���t���kws���unexpected endi����s ���unmatched endi���i����s���unterminated keywordss��� %s (���t���TrueR%���R���R)���t���groupR#���t���popR.���t���lenR���t���startt���appendt���nextt���has_keyR���(���R���t���stackR���t���mR/���t���kw2t���kwat���kwb(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���reformat����s@���� � c���������C��s����d�}�d�}�x��t��r��|��j����}�|�s+�Pn��|��j�j�|���}�|�rS�|�d�7}�q�n��|��j�j�|���}�|�r��|�j�d���}�|�t�k�r��|�d�7}�q��n��|��j�|���q�W|�|�d�k��r��t�j �j�d���n#�|�|�d�k�r��t�j �j�d���n��d��S(���Ni����i���R/���s5���Warning: input contained more end tags than expected s5���Warning: input contained less end tags than expected ( ���R0���R%���R���R)���R���R1���R4���R���R���R ���(���R���t ���begin_countert���end_counterR���R9���R/���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���delete����s(���� � c���������C��s\��g��}�g��}�d�}�}�}�}�}�x3t��rW|��j����}�|��j�j�|���j����} �|��j�j�|���} �| �r��d�}�| �j�d���}�| �j�d���}�n��|��j�j�|���} �| �r��| �j�d���}�t�j �|���s��d�}�n��|�d �k�r��| �j�d���}�q$d�}�n0�|�| �| �d�!d�k�r|�j �|���q%�n�d�}�|�| � } �t�| �j�|��j �����}�t�|�j�|��j �����}�x��|�|�k��r�|�r�|�r�d �|�|�f�}�n �d�|�}�|��j�|�|���d�}�}�n��|�j����\�}�}�}�}�t�|�j�|��j �����}�qaW|�|�k�r�|�r�|�d�k�r/|�|�k�r"|��j�d���n��d�}�}�q�|�sB|�t�k�r�|�r[d �|�|�f�}�n �d�|�}�|��j�|�|���d�}�}�}�q�n��|�|�k�r�|�j �|�|�|�|�f���|�r�|�t�k�r�d�}�n��| �|�|�|�f�\�}�}�}�}�n��|�r|�t�k�r|�}�}�|�}�q|�}�n��x�|�D]�}�|��j�|���q Wg��}�|�sGPn��|��j�|���q%�Wd��S(���NR&���R���R/���t���idR���R���i���s��� t���#s���# end %s %s s ���# end %s s���mismatched end(���R���R���(���s��� RB���(���R0���R%���R���R)���R���R���R1���R���R6���R7���R5���R3���R���R���R���R2���R#���R4���(���R���R8���t���todot ���currentwst���thisidt���firstkwt���lastkwt���topidR���R-���R9���t���thiskwt���endkwt���indentwsR*���t���currentt���st���l(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���complete����s����� ! ��(���t���__name__t ���__module__R���t���stdint���stdoutt���STEPSIZEt���TABSIZEt ���EXPANDTABSR���R���R���R#���R%���R.���R=���R@���RO���(����(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyR ���d���s��� + c���������C��s&���t��|��|�|�|�|���}�|�j����d��S(���N(���R ���RO���(���t���inputt���outputt���stepsizeR���R���t���pi(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���complete_filterM��s����c���������C��s&���t��|��|�|�|�|���}�|�j����d��S(���N(���R ���R@���(���RW���RX���RY���R���R���RZ���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt ���delete_filterS��s����c���������C��s&���t��|��|�|�|�|���}�|�j����d��S(���N(���R ���R=���(���RW���RX���RY���R���R���RZ���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���reformat_filterY��s����c���������C��sG���t��j�|����}�t��j����}�t�|�|�|�|�|���}�|�j����|�j����S(���N(���t���iot���BytesIOR ���RO���t���getvalue(���t���sourceRY���R���R���RW���RX���RZ���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���complete_string_��s ���� c���������C��sG���t��j�|����}�t��j����}�t�|�|�|�|�|���}�|�j����|�j����S(���N(���R^���R_���R ���R@���R`���(���Ra���RY���R���R���RW���RX���RZ���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt ���delete_stringg��s ���� c���������C��sG���t��j�|����}�t��j����}�t�|�|�|�|�|���}�|�j����|�j����S(���N(���R^���R_���R ���R=���R`���(���Ra���RY���R���R���RW���RX���RZ���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���reformat_stringo��s ���� c���������C��s����d�d��l��}�d�d��l�}�|��d�}�|�j�j�|���ry�y�|�j�|���Wqy�|�j�k �ru�t�d�|�f�d�t�j��qy�Xn��y�|�j �|��|���Wn1�|�j�k �r��t�d�|��|�f�d�t�j��n�Xd��S(���Ni����t���~s���Can't remove backup %rt���files���Can't rename %r to %r( ���t���ost���os.patht���patht���lexistst���removeR#���t���printR���R ���t���rename(���t���filenameRg���t���backup(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���make_backupw��s���� !c���������C��s|���t��|��d�����}�|�j����}�Wd��QXt�|�|�|�|���}�|�|�k�rI�d�St�|����t��|��d�����}�|�j�|���Wd��QXd�S(���Nt���ri����t���wi���(���t���opent���readRb���Rp���R���(���Rn���RY���R���R���t���fRa���t���result(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt ���complete_file���s����� c���������C��s|���t��|��d�����}�|�j����}�Wd��QXt�|�|�|�|���}�|�|�k�rI�d�St�|����t��|��d�����}�|�j�|���Wd��QXd�S(���NRq���i����Rr���i���(���Rs���Rt���Rc���Rp���R���(���Rn���RY���R���R���Ru���Ra���Rv���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���delete_file���s����� c���������C��s|���t��|��d�����}�|�j����}�Wd��QXt�|�|�|�|���}�|�|�k�rI�d�St�|����t��|��d�����}�|�j�|���Wd��QXd�S(���NRq���i����Rr���i���(���Rs���Rt���Rd���Rp���R���(���Rn���RY���R���R���Ru���Ra���Rv���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt ���reformat_file���s����� sG�� usage: pindent (-c|-d|-r) [-s stepsize] [-t tabsize] [-e] [file] ... -c : complete a correctly indented program (add #end directives) -d : delete #end directives -r : reformat a completed program (use #end directives) -s stepsize: indentation step (default %(STEPSIZE)d) -t tabsize : the worth in spaces of a tab (default %(TABSIZE)d) -e : expand TABs into spaces (default OFF) [file] ... : files are changed in place, with backups in file~ If no files are specified or a single - is given, the program acts as a filter (reads stdin, writes stdout). c���������C��sE���t��j�j�d�|��d�|�d�d���t��j�j�t���t��j�d���d��S(���Ns ���Error: You can not specify both s��� and -i����s��� at the same time i���(���R���R ���R���t���usaget���exit(���t���op1t���op2(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt ���error_both���s����$c����������C��s'��d�d��l��}��y#�|��j��t�j�d�d���\�}�}�WnG�|��j�k �rx�}�t�j�j�d�|���t�j�j�t���t�j�d���n�Xd��}�t �}�t �}�t�}�x��|�D]��\�}�} �|�d�k�r��|�r��t�|�|���n��d�}�q��|�d�k�r��|�r��t�|�|���n��d �}�q��|�d �k�r%|�rt�|�|���n��d�}�q��|�d�k�r@t �| ���}�q��|�d �k�r[t �| ���}�q��|�d�k�r��t�}�q��q��W|�s�t�j�j�d���t�j�j�t���t�j�d���n��|�s�|�d�g�k�r�t�|�d���}�|�t�j�t�j�|�|�|���n4�t�|�d���}�x!�|�D]�} �|�| �|�|�|���qWd��S(���Ni����i���s���cdrs:t:es ���Error: %s i���s���-cRO���s���-dR@���s���-rR=���s���-ss���-ts���-es7���You must specify -c(omplete), -d(elete) or -r(eformat) t���-t���_filtert���_file(���t���getoptR���t���argvR#���R ���R���Rz���R{���t���NoneRT���RU���RV���R~���t���intR0���t���evalRR���RS���(���R����t���optsR"���t���msgt���actionRY���R���R���t���ot���aRn���(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���test���sR����#� � � t���__main__(���R���R���R���(���R���R���(���R���R���(���R���R���R���R���(����(���R���R���R���R ���R ���R���R���(����(���t ���__future__R����RT���RU���t���FalseRV���R^���R���R���R6���R4���R ���RR���RS���R[���R\���R]���Rb���Rc���Rd���Rp���Rw���Rx���Ry���t���varsRz���R~���R����RP���(����(����(����s-���/usr/lib64/python2.7/Tools/scripts/pindent.pyt���<module>O���sB��� * � 3