%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/__pycache__/tabnanny.cpython-312.pyc

�

���f
-���dZdZddlZddlZddlZgd�Zdadad�Zd�Z	Gd�de
�Zd	�ZGd
�d�Z
d�Zd
�Zd�Zedk(re	�yy)a�The Tab Nanny despises ambiguous indentation.  She knows no mercy.

tabnanny -- Detection of ambiguous indentation

For the time being this module is intended to be called as a script.
However it is possible to import it into an IDE and use the function
check() described below.

Warning: The API provided by this module is likely to change in future
releases; such changes may not be backward compatible.
�6�N)�check�NannyNag�process_tokensc���d}|D]/}tjj|t|�z�d}�1tjjd�tjd�y)N�� �
�)�sys�stderr�write�str�exit)�args�sep�args   �/usr/lib/python3.12/tabnanny.py�errprintr sT��
�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�(�eZdZdZd�Zd�Zd�Zd�Zy)rzk
    Raised by process_tokens() if detecting an ambiguous indent.
    Captured and handled in check().
    c�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__�__doc__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)a~check(file_or_dir)

    If file_or_dir is a directory and not a symbolic link, then recursively
    descend the directory tree named by file_or_dir, checking all .py files
    along the way. If file_or_dir is an ordinary Python source file, it is
    checked for whitespace related problems. The diagnostic messages are
    written to standard output using the print statement.
    z: listing directory���Nz.pyz
: I/O Error: rzchecking %r ...z: Token Error: z: Indentation 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�SyntaxError�IndentationErrorrr,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	
���	��-���$��4�5��(	
���	��%����c�:�;�� 	
���	�����.�.�"���|�|�~����=��w��O�P��$�0�1��#�+�+�-� ��d�{�3��:��#3�D��e�D�k���g�t�D�z�2��	
���	����	
���	�sy�E<�-(F"�<	F�F�F�"K4�5G�K7�K4�&H�6K7�K4�H<�'K7�<K4�BK/�K7�/K4�4K7�7L	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)
�rawrS�S�T�len�n�nt�tuple�norm�	is_simple)	r(�wsrVrW�count�brYrZ�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\�maxrX)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\�rangerXrZ)r(�tabsizer_re�il�is      r�indent_levelzWhitespace.indent_level�s_���)�)���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|Src�rdrfrhrl�append�r(rnrYr!�tss     r�not_equal_witnesszWhitespace.not_equal_witness������*�*�,��+�+�-�
/�12�
3������1�Q�3�-�	5�B�� � ��$��(:�(:�2�(>�>����2��,�,�R�0� �-�-�b�1�3�5�	5�
�rc�b�|j|jk\ry|jr%|jr|j|jkSt|j	�|j	��dz}td|dz�D]'}|j
|�|j
|�k\s�'yy)NFr�T)rYr]rZrdrfrhrl)r(rnrYrts    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|Srcrqrss     r�not_less_witnesszWhitespace.not_less_witnessrvrN)r1r2r3rVrWr)rfrlroruryr{r5rrrSrS�s.���D�A�q�*)�2+�3�.'�	�0�"	rrSc�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����
'�c�c�#�a�&�k�
'�s�zat tab sizer�sr	z, )rXr?)�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. )rA�INDENT�DEDENT�NEWLINE�COMMENT�NLrSryr{r�rrrroru)r�r�r�r��JUNK�indents�check_equal�type�token�start�endr'�thisguy�witnessrs               rr�r�sQ��
�_�_�F�
�_�_�F����G����X�[�[�(�D��"�~��G��K�+1�,4�'��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,4r�__main__)r4�__version__r9rrA�__all__rrrr"�	ExceptionrrrSr�rr�r1r5rr�<module>r�sv��
�$��	�
��
1��
���
���$�y��?5�BD�D�L,�0�44�n�z���F�r

Zerion Mini Shell 1.0