Your IP : 3.146.176.191


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/tabnanny.cpython-312.opt-2.pyc

�

�Q�f-���	dZddlZddlZddlZgd�Zdadad�Zd�ZGd�de	�Z
d�ZGd	�d
�Zd�Z
d�Zd
�Zedk(re�yy)�6�N)�check�NannyNag�process_tokensc���d}|D]/}tjj|t|�z�d}�1tjjd�tjd�y)N�� �
�)�sys�stderr�write�str�exit)�args�sep�args   �//opt/alt/python312/lib64/python3.12/tabnanny.py�errprintr sO��
�C����
�
����s�3�x��(�����J�J���T���H�H�Q�K�c�Z�ddl}	|jtjddd�\}}D]"\}}|dk(r	t
dza|dk(s�tdza�$st	dtjdd�|D]
}t|��y#|j$r}t	|�Yd}~�yd}~wwxYw)Nrr�qvz-qz-vzUsage:z[-v] file_or_directory ...)�getoptr�argv�errorr�
filename_only�verboser)r�optsr�msg�o�ars       r�mainr"(s������]�]�3�8�8�A�B�<��6�
��d����1���9�)�A�-�M���9���k�G�	�
���3�8�8�A�;�(D�E���
�c�
����<�<����
�
���s�&B�B*�B%�%B*c�&�eZdZ	d�Zd�Zd�Zd�Zy)rc�0�|||c|_|_|_y�N)�linenor�line)�selfr&rr's    r�__init__zNannyNag.__init__?s��+1�3��(���T�X�t�yrc��|jSr%)r&�r(s r�
get_linenozNannyNag.get_linenoAs���{�{�rc��|jSr%)rr+s r�get_msgzNannyNag.get_msgCs���x�x�rc��|jSr%)r'r+s r�get_linezNannyNag.get_lineEs���y�y�rN)�__name__�
__module__�__qualname__r)r,r.r0�rrrr:s���=���rrc��	tjj|�r�tjj|�s�trt|�d��tj|�}|D]�}tjj||�}tjj|�rtjj|�r&tjj|dd�dk(s��t|���y	tj|�}tdkDrtd|z�	ttj|j ��	|j%�trt|�d��yy#t$r}t|�d|���Yd}~yd}~wwxYw#tj"$r*}t|�d|���Yd}~|j%�yd}~wt&$r*}t|�d|���Yd}~|j%�yd}~wt($r*}t|�d	|���Yd}~|j%�yd}~wt*$r�}|j-�}|j/�}tr8td
||fz�td|���t|j1��n4d|vrd
|zd
z}t2rt|�nt||t5|��Yd}~|j%�yd}~wwxYw#|j%�wxYw)Nz: listing directory���z.pyz
: I/O Error: rzchecking %r ...z: Token Error: z: Indentation Error: z: Syntax Error: z)%r: *** Line %d: trouble in tab city! ***zoffending line: r	�"z: Clean bill of health.)�os�path�isdir�islinkr�print�listdir�join�normcaser�tokenize�open�OSErrorrr�generate_tokens�readline�
TokenError�close�IndentationError�SyntaxErrorrr,r0r.r�repr)	�file�names�name�fullname�fr�nag�badliner's	         rrrHsG���
�w�w�}�}�T��2�7�7�>�>�$�#7���T�3�4��
�
�4� ���D��w�w�|�|�D�$�/�H����
�
�h�'��G�G�N�N�8�,���� � ��b�c��+�u�4��h���	���M�M�$���
��{�
��$�&�'���x�/�/��
�
�;�<�8	
���	��
�T�3�4���M����c�2�3����������$��4�5��0	
���	��-����c�:�;��(	
���	��%���4��5�6�� 	
���	�����.�.�"���|�|�~����=��w��O�P��$�0�1��#�+�+�-� ��d�{�3��:��#3�D��e�D�k���g�t�D�z�2��	
���	����	
���	�sy�E=�.(F#�=	F �F�F �#K5�6G�K8�K5�'H�7K8�K5�H=�(K8�=K5�	BK0�K8�0K5�5K8�8L
c�@�eZdZd\ZZd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zy	)
�
Whitespacez 	c��||_tjtj}}g}dx}x}}|jD]V}||k(r|dz}|dz}�||k(r>|dz}|dz}|t	|�k\r|dg|t	|�z
dzzz}||dz||<d}�Vn||_||_t|�|f|_t	|�dk|_	y)Nrr)
�rawrR�S�T�len�n�nt�tuple�norm�	is_simple)	r(�wsrUrV�count�brXrY�chs	         rr)zWhitespace.__init__�s�������|�|�Z�\�\�1��������A���(�(�B��Q�w���E����E���q����E���!�V����E�
�?�!�Q�C�1�s�5�z�>�A�+=�$>�>�E� ��8�a�<��a�������������%�L�!�O��	��U��q���rc�P�|j\}}tt|�dz
|�S�Nr)r[�maxrW)r(r^�trailings   r�longest_run_of_spacesz Whitespace.longest_run_of_spaces�s$���)�)���x��3�u�:�a�<��*�*rc��|j\}}d}t|t|��D]}|||z||zz}�||||jzzzS)Nr)r[�rangerWrY)r(�tabsizer^rd�il�is      r�indent_levelzWhitespace.indent_level�sZ���)�)���x�
���w��E�
�+�A��a��j�5��8�+�+�B�,��'�R�$�'�'�\�2�2�2rc�4�|j|jk(Sr%)r[)r(�others  r�equalzWhitespace.equal�s���y�y�E�J�J�&�&rc�4�t|j�|j��dz}g}td|dz�D]X}|j|�|j|�k7s�'|j	||j|�|j|�f��Z|Srb�rcrergrk�append�r(rmrXr!�tss     r�not_equal_witnesszWhitespace.not_equal_witness������*�*�,��+�+�-�
/�12�
3������1�Q�3�-�B�� � ��$��(:�(:�2�(>�>����2��,�,�R�0� �-�-�b�1�3�5� �
�rc�b�|j|jk\ry|jr%|jr|j|jkSt|j	�|j	��dz}td|dz�D]'}|j
|�|j
|�k\s�'yy)NFr�T)rXr\rYrcrergrk)r(rmrXrss    r�lesszWhitespace.less�s����6�6�U�W�W����>�>�e�o�o��7�7�e�h�h�&�&���*�*�,��+�+�-�
/�12�
3����1�Q�3�-�B�� � ��$��(:�(:�2�(>�>�� �rc�4�t|j�|j��dz}g}td|dz�D]X}|j|�|j|�k\s�'|j	||j|�|j|�f��Z|Srbrprrs     r�not_less_witnesszWhitespace.not_less_witnessrurN)r1r2r3rUrVr)rerkrnrtrxrzr4rrrRrR�s.���D�A�q�*)�2+�3�.'�	�0�"	rrRc�l�d�|D�}d}t|�dkDr|dz}|dzdj|�zS)Nc3�8K�|]}t|d����y�w)rN)r)�.0�tups  r�	<genexpr>z#format_witnesses.<locals>.<genexpr>s����
'�Q�c�c�#�a�&�k�Q�s�zat tab sizer�sr	z, )rWr>)�w�firsts�prefixs   r�format_witnessesr�s=��
'�Q�
'�F�
�F�
�1�v��z��#����C�<�$�)�)�F�+�+�+rc��	t|�y#t$r0}t|j|j|j
��d}~wwxYwr%)�_process_tokens�TabErrorrr&r�text)�tokens�es  rrrs:��0������0��q�x�x�������/�/��0�s��	A�+A�Ac��tj}tj}tj}tjtj
f}t
d�g}d}|D]�\}}}	}
}||k(rd}�||k(red}t
|�}|dj|�s2|dj|�}
dt|
�z}t|	d||��|j|��{||k(rd}|d=��|s��||vs��d}t
|�}|dj|�r��|dj|�}
dt|
�z}t|	d||��y)Nrrr���zindent not greater e.g. zindent not equal e.g. )r@�INDENT�DEDENT�NEWLINE�COMMENT�NLrRrxrzr�rrqrnrt)r�r�r�r��JUNK�indents�check_equal�type�token�start�endr'�thisguy�witnessrs               rr�r�sL��
�_�_�F�
�_�_�F����G����X�[�[�(�D��"�~��G��K�+1�'��u�e�S�$��7�?��K�
�V�^��K� ��'�G��2�;�#�#�G�,�!�"�+�6�6�w�?��0�3C�G�3L�L���u�Q�x��d�3�3��N�N�7�#�
�V�^��K����
�T��-��K� ��&�G��2�;�$�$�W�-�!�"�+�7�7��@��.�1A�'�1J�J���u�Q�x��d�3�3�Y,2r�__main__)�__version__r8rr@�__all__rrrr"�	ExceptionrrrRr�rr�r1r4rr�<module>r�sv��
�$��	�
��
1��
���
���$�y��?5�BD�D�L,�0�44�n�z���F�r

?>