a ze,@sdZdZddlZddlZddlZeeds2edgdZdada ddZ d d Z Gd d d e Z d dZGdddZddZddZedkre dS)aThe 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. 6NNLz4tokenize.NL doesn't exist -- tokenize module too old)checkNannyNagprocess_tokenscGs6d}|D]}tj|t|d}qtjddS)N  )sysstderrwritestr)argssepargrz#format_witnesses..z at tab sizersrz, )rGr3)wZfirstsprefixrrrformat_witnessess  ricCstj}tj}tj}tjtjf}tdg}d}|D]\}}} } } ||krLd}q0||krd}t|} |d| s|d| } dt | }t | d|| | | q0||krd}|d=q0|r0||vr0d}t| } |d | s0|d | } dt | }t | d|| q0dS)Nrrrzindent not greater e.g. zindent not equal e.g. )r5INDENTDEDENTNEWLINECOMMENTrrCr`rarirr[rYr^)tokensrkrlrmZJUNKindentsZ check_equaltypetokenstartendr ZthisguyZwitnessrrrrrs6       r__main__)r* __version__r-r r5hasattr ValueError__all__rrrr ExceptionrrrCrirr'rrrrs& =7