AlkantarClanX12

Your IP : 3.21.46.68


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/tabnanny.cpython-37.opt-2.pyc

B

YI~d�,�@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_tokenscGs:d}x$|D]}tj�|t|��d}q
Wtj�d�dS)N�� �
)�sys�stderr�write�str)�args�sep�arg�r�-/opt/alt/python37/lib64/python3.7/tabnanny.py�errprint"s

rc
Cs�ddl}y|�tjdd�d�\}}Wn,|jk
rR}zt|�dSd}~XYnXx0|D](\}}|dkrrtda|dkrZtdaqZW|s�tdtjdd�dSx|D]}t|�q�WdS)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)�selfrrrrrr�__init__BszNannyNag.__init__cCs|jS)N)r)r rrr�
get_linenoDszNannyNag.get_linenocCs|jS)N)r)r rrr�get_msgFszNannyNag.get_msgcCs|jS)N)r)r rrr�get_lineHszNannyNag.get_lineN)�__name__�
__module__�__qualname__r!r"r#r$rrrrr=sc	
Cs&tj�|�r�tj�|�s�tr*td|f�t�|�}xR|D]J}tj�||�}tj�|�rdtj�|�r|tj�|dd��dkr:t	|�q:WdSyt
�|�}Wn2tk
r�}zt
d||f�dSd}~XYnXtdkr�td|��zytt
�|j��W�nt
jk
�r2}zt
d||f�dSd}~XYn�tk
�rd}zt
d||f�dSd}~XYn�tk
�r�}z||��}|��}t�r�td	||f�td
|f�t|���n6d|k�r�d|d}t�r�t|�nt||t|��dSd}~XYnXWd|��Xt�r"td
|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�OSErrorrr�generate_tokens�readline�
TokenError�IndentationErrorrr"r$r#r�repr�close)	�file�names�name�fullname�frZnag�badlinerrrrrKsT





c@sLeZdZd\ZZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)�
Whitespacez 	c	Cs�||_tjtj}}g}d}}}x~|jD]t}||krJ|d}|d}q,||kr�|d}|d}|t|�kr�|dg|t|�d}||d||<d}q,Pq,W||_||_t|�|f|_t|�dk|_	dS)Nrr)
�rawrA�S�T�len�n�nt�tuple�norm�	is_simple)	r ZwsrCrD�count�brFrGZchrrrr!�s(
zWhitespace.__init__cCs|j\}}tt|�d|�S)Nr)rI�maxrE)r rK�trailingrrr�longest_run_of_spaces�s
z Whitespace.longest_run_of_spacescCsL|j\}}d}x*t|t|��D]}|||||}qW||||jS)Nr)rI�rangerErG)r �tabsizerKrNZil�irrr�indent_level�s

zWhitespace.indent_levelcCs|j|jkS)N)rI)r �otherrrr�equal�szWhitespace.equalcCsft|��|���d}g}xFtd|d�D]4}|�|�|�|�kr*|�||�|�|�|�f�q*W|S)Nr)rMrOrPrS�append)r rTrFr�tsrrr�not_equal_witness�szWhitespace.not_equal_witnesscCsr|j|jkrdS|jr(|jr(|j|jkSt|��|���d}x.td|d�D]}|�|�|�|�krNdSqNWdS)NFr�T)rFrJrGrMrOrPrS)r rTrFrWrrr�less�szWhitespace.lesscCsft|��|���d}g}xFtd|d�D]4}|�|�|�|�kr*|�||�|�|�|�f�q*W|S)Nr)rMrOrPrSrV)r rTrFrrWrrr�not_less_witnessszWhitespace.not_less_witnessN)r%r&r'rCrDr!rOrSrUrXrZr[rrrrrA�srAcCs8dd�|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, )rEr0)�wZfirsts�prefixrrr�format_witnessess
rbcCstj}tj}tj}tjtjf}td�g}d}x�|D]�\}}}	}
}||krNd}q2||kr�d}t|�}|d�|�s�|d�|�}
dt	|
�}t
|	d||��|�|�q2||kr�d}|d=q2|r2||kr2d}t|�}|d�|�s2|d�
|�}
dt	|
�}t
|	d||��q2WdS)Nrrr���zindent not greater e.g. zindent not equal e.g. )r2�INDENT�DEDENT�NEWLINE�COMMENTrrArZr[rbrrVrUrX)�tokensrdrerfZJUNK�indentsZcheck_equal�type�token�start�endrZthisguyZwitnessrrrrrs6

�__main__)�__version__r*r
r2�hasattr�
ValueError�__all__rrrr�	ExceptionrrrArbrr%rrrr�<module>s$

=7