AlkantarClanX12

Your IP : 3.144.31.17


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/tabnanny.cpython-33.pyc

�
��f�,c@s�dZdZddlZddlZddlZddlZeed�sZed��ndddgZda	da
d	d
�Zdd�ZGd
d�de
�Zdd�ZGdd�d�Zdd�Zdd�Zedkr�e�ndS(u�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.
u6iNuNLu4tokenize.NL doesn't exist -- tokenize module too olducheckuNannyNaguprocess_tokenscGsKd}x.|D]&}tjj|t|��d}q
Wtjjd�dS(Nuu u
(usysustderruwriteustr(uargsusepuarg((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuerrprint#s


uerrprintcCs�y)tjtjdd�d�\}}Wn6tjk
ra}zt|�dSWYdd}~XnXxF|D]>\}}|dkr�tdan|dkritdaqiqiW|s�tdtjdd�dSx|D]}t|�q�WdS(Niuqvu-qu-vuUsage:iu[-v] file_or_directory ...(ugetoptusysuargvuerroruerrprintu
filename_onlyuverboseucheck(uoptsuargsumsguouauarg((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyumain*s)


umaincBsJ|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S(uNannyNagug
    Raised by tokeneater() if detecting an ambiguous indent.
    Captured and handled in check().
    cCs!||||_|_|_dS(N(ulinenoumsguline(uselfulinenoumsguline((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu__init__AsuNannyNag.__init__cCs|jS(N(ulineno(uself((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu
get_linenoCsuNannyNag.get_linenocCs|jS(N(umsg(uself((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuget_msgEsuNannyNag.get_msgcCs|jS(N(uline(uself((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuget_lineGsuNannyNag.get_lineN(u__name__u
__module__u__qualname__u__doc__u__init__u
get_linenouget_msguget_line(u
__locals__((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuNannyNag<s
c	&Cs�tjj|�r�tjj|�r�tr?td|f�ntj|�}xw|D]o}tjj||�}tjj|�r�tjj|�s�tjj|dd��dkrUt	|�qUqUWdSyt
j|�}Wn=tk
r}zt
d||f�dSWYdd}~XnXtdkr<td|�nzaytt
j|j��Wn@t
jk
r�}zt
d||f�dSWYdd}~Xntk
r�}zt
d	||f�dSWYdd}~Xn�tk
r�}z�|j�}|j�}tr?td
||f�td|f�t|j��nFd|kr\d
|d
}ntrot|�nt||t|��dSWYdd}~XnXWd|j�Xtr�td|f�ndS(u~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.
    u%r: listing directoryiNu.pyu%r: I/O Error: %siuchecking %r ...u%r: Token Error: %su%r: Indentation Error: %su)%r: *** Line %d: trouble in tab city! ***uoffending line: %ru u"u%r: Clean bill of health.i����(uosupathuisdiruislinkuverboseuprintulistdirujoinunormcaseucheckutokenizeuopenuIOErroruerrprintuprocess_tokensugenerate_tokensureadlineu
TokenErroruIndentationErroruNannyNagu
get_linenouget_lineuget_msgu
filename_onlyurepruclose(	ufileunamesunameufullnameufumsgunagubadlineuline((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyucheckJsT
%
"
cBst|EeZdZd\ZZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS(u
Whitespaceu 	c	Cs||_tjtj}}g}d}}}x�|jD]�}||krc|d}|d}q:||kr�|d}|d}|t|�kr�|dg|t|�d}n||d||<d}q:Pq:W||_||_t|�|f|_t|�dk|_	dS(Nii(
urawu
WhitespaceuSuTulenununtutupleunormu	is_simple(	uselfuwsuSuTucountubununtuch((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu__init__�s(	



"			uWhitespace.__init__cCs&|j\}}tt|�d|�S(Ni(unormumaxulen(uselfucountutrailing((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyulongest_run_of_spaces�su Whitespace.longest_run_of_spacescCs^|j\}}d}x3t|t|��D]}|||||}q+W||||jS(Ni(unormurangeulenunt(uselfutabsizeucountutrailinguilui((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuindent_level�s
uWhitespace.indent_levelcCs|j|jkS(N(unorm(uselfuother((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuequal�suWhitespace.equalcCs�t|j�|j��d}g}xdtd|d�D]O}|j|�|j|�kr9|j||j|�|j|�f�q9q9W|S(Ni(umaxulongest_run_of_spacesurangeuindent_leveluappend(uselfuotherunuauts((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyunot_equal_witness�s	uWhitespace.not_equal_witnesscCs�|j|jkrdS|jr8|jr8|j|jkSt|j�|j��d}x=td|d�D](}|j|�|j|�krkdSqkWdS(NiiFT(	unuFalseu	is_simpleuntumaxulongest_run_of_spacesurangeuindent_leveluTrue(uselfuotherunuts((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuless�suWhitespace.lesscCs�t|j�|j��d}g}xdtd|d�D]O}|j|�|j|�kr9|j||j|�|j|�f�q9q9W|S(Ni(umaxulongest_run_of_spacesurangeuindent_leveluappend(uselfuotherunuauts((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyunot_less_witnesss	uWhitespace.not_less_witnessN(u__name__u
__module__u__qualname__uSuTu__init__ulongest_run_of_spacesuindent_leveluequalunot_equal_witnessulessunot_less_witness(u
__locals__((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu
Whitespace�su
WhitespacecCsMdd�|D�}d}t|�dkr8|d}n|ddj|�S(Ncss|]}t|d�VqdS(iN(ustr(u.0utup((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu	<genexpr>su#format_witnesses.<locals>.<genexpr>uat tab sizeiusu u, (ulenujoin(uwufirstsuprefix((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuformat_witnesses
s

uformat_witnessescCs�tj}tj}tj}tjtjf}td�g}d}xA|D]9\}}}	}
}||krsd}qI||kr�d}t|�}|dj|�s�|dj|�}
dt	|
�}t
|	d||��n|j|�qI||krd}|d=qI|rI||krId}t|�}|d	j|�s�|d
j
|�}
dt	|
�}t
|	d||��q�qIqIWdS(Nuiiuindent not greater e.g. uindent not equal e.g. i����i����i����i����i����(utokenizeuINDENTuDEDENTuNEWLINEuCOMMENTuNLu
Whitespaceulessunot_less_witnessuformat_witnessesuNannyNaguappenduequalunot_equal_witness(utokensuINDENTuDEDENTuNEWLINEuJUNKuindentsucheck_equalutypeutokenustartuendulineuthisguyuwitnessumsg((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyuprocess_tokenss6				

u__main__(u__doc__u__version__uosusysugetoptutokenizeuhasattru
ValueErroru__all__uverboseu
filename_onlyuerrprintumainu	ExceptionuNannyNaguchecku
Whitespaceuformat_witnessesuprocess_tokensu__name__(((u-/opt/alt/python33/lib64/python3.3/tabnanny.pyu<module>
s&=�7