AlkantarClanX12

Your IP : 3.141.198.147


Current Path : /lib64/python3.8/__pycache__/
Upload File :
Current File : //lib64/python3.8/__pycache__/tabnanny.cpython-38.opt-2.pyc

U

e5d�,�@s�dZddlZddlZddlZeed�s.ed��dddgZdadadd	�Z	d
d�Z
Gdd�de�Zd
d�Z
Gdd�d�Zdd�Zdd�Zedkr�e
�dS)�6�N�NLz4tokenize.NL doesn't exist -- tokenize module too old�check�NannyNag�process_tokenscGs6d}|D]}tj�|t|��d}qtj�d�dS)N�� �
)�sys�stderr�write�str)�args�sep�arg�r� /usr/lib64/python3.8/tabnanny.py�errprint"s
rc
Cs�ddl}z|�tjdd�d�\}}Wn2|jk
rX}zt|�WY�dSd}~XYnX|D](\}}|dkrvtda|dkr^tdaq^|s�tdtjdd�dS|D]}t|�q�dS)Nr�Zqvz-qz-vzUsage:z[-v] file_or_directory ...)�getoptr
�argv�errorr�
filename_only�verboser)rZoptsr�msg�o�arrrr�main)s 
rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
rcCs||||_|_|_dS�N)�linenor�line)�selfrrr rrr�__init__BszNannyNag.__init__cCs|jSr)r�r!rrr�
get_linenoDszNannyNag.get_linenocCs|jSr)rr#rrr�get_msgFszNannyNag.get_msgcCs|jSr)r r#rrr�get_lineHszNannyNag.get_lineN)�__name__�
__module__�__qualname__r"r$r%r&rrrrr=sc	
CsHtj�|�r�tj�|�s�tr*td|f�t�|�}|D]J}tj�||�}tj�|�rbtj�|�rztj�|dd��dkr8t	|�q8dSzt
�|�}Wn8tk
r�}zt
d||f�WY�dSd}~XYnXtdkr�td|��z>ztt
�|j��W�n"t
jk
�r@}z t
d||f�WY�
W���dSd}~XYn�tk
�r|}zt
d||f�WY�W��dSd}~XYn�tk
�r }z�|��}|��}t�r�td	||f�td
|f�t|���n6d|k�r�d|d}t�r�t|�nt||t|��WY�W�dSd}~XYnXW5|��Xt�rDtd
|f�dS)Nz%r: listing directory���z.pyz%r: I/O Error: %srzchecking %r ...z%r: Token Error: %sz%r: Indentation Error: %sz)%r: *** Line %d: trouble in tab city! ***zoffending line: %rr�"z%r: Clean bill of health.)�os�path�isdir�islinkr�print�listdir�join�normcaser�tokenize�open�OSErrorr�closer�generate_tokens�readline�
TokenError�IndentationErrorrr$r&r%r�repr)	�file�names�name�fullname�frZnag�badliner rrrrKsX


��


 
c@sLeZdZd\ZZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)�
Whitespacez 	c	Cs�||_tjtj}}g}d}}}|jD]v}||krH|d}|d}q*||kr�|d}|d}|t|�kr�|dg|t|�d}||d||<d}q*q�q*||_||_t|�|f|_t|�dk|_	dS)Nrr)
�rawrC�S�T�len�n�nt�tuple�norm�	is_simple)	r!ZwsrErF�count�brHrIZchrrrr"�s(

zWhitespace.__init__cCs|j\}}tt|�d|�S�Nr)rK�maxrG)r!rM�trailingrrr�longest_run_of_spaces�s
z Whitespace.longest_run_of_spacescCsH|j\}}d}t|t|��D]}|||||}q||||jS)Nr)rK�rangerGrI)r!�tabsizerMrQZil�irrr�indent_level�s

zWhitespace.indent_levelcCs|j|jkSr)rK)r!�otherrrr�equal�szWhitespace.equalcCsbt|��|���d}g}td|d�D]4}|�|�|�|�kr(|�||�|�|�|�f�q(|SrO�rPrRrSrV�append�r!rWrHr�tsrrr�not_equal_witness�s���zWhitespace.not_equal_witnesscCsp|j|jkrdS|jr(|jr(|j|jkSt|��|���d}td|d�D]}|�|�|�|�krLdSqLdS)NFr�T)rHrLrIrPrRrSrV)r!rWrHr\rrr�less�s��zWhitespace.lesscCsbt|��|���d}g}td|d�D]4}|�|�|�|�kr(|�||�|�|�|�f�q(|SrOrYr[rrr�not_less_witnesss���zWhitespace.not_less_witnessN)r'r(r)rErFr"rRrVrXr]r_r`rrrrrC�srCcCs8dd�|D�}d}t|�dkr&|d}|dd�|�S)Ncss|]}t|d�VqdS)rN)r
)�.0�tuprrr�	<genexpr>sz#format_witnesses.<locals>.<genexpr>zat tab sizer�srz, )rGr2)�wZfirsts�prefixrrr�format_witnessess
rgcCstj}tj}tj}tjtjf}td�g}d}|D]�\}}}	}
}||krLd}q0||kr�d}t|�}|d�|�s�|d�|�}
dt	|
�}t
|	d||��|�|�q0||kr�d}|d=q0|r0||kr0d}t|�}|d�|�s0|d�
|�}
dt	|
�}t
|	d||��q0dS)Nrrr���zindent not greater e.g. zindent not equal e.g. )r4�INDENT�DEDENT�NEWLINE�COMMENTrrCr_r`rgrrZrXr])�tokensrirjrkZJUNK�indentsZcheck_equal�type�token�start�endr ZthisguyZwitnessrrrrrs6

�__main__)�__version__r,r
r4�hasattr�
ValueError�__all__rrrr�	ExceptionrrrCrgrr'rrrr�<module>s$

=7