Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 lŽŒY‹,ã@sîdZdZddlZddlZddlZddlZeedƒsWedƒ‚dddgZda da d d „Z d d „Z Gd d„de ƒZdd„ZGdd„dƒZdd„Zdd„Zedkrêe ƒdS)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ÚNLz4tokenize.NL doesn't exist -- tokenize module too oldÚcheckÚNannyNagÚprocess_tokenscGsKd}x.|D]&}tjj|t|ƒƒd}q WtjjdƒdS)NÚú Ú )ÚsysÚstderrÚwriteÚstr)ÚargsÚsepÚarg©rú'/opt/python35/lib/python3.5/tabnanny.pyÚerrprint#s   rcCsåy)tjtjdd…dƒ\}}Wn6tjk ra}zt|ƒdSWYdd}~XnXx@|D]8\}}|dkr‹tda|dkritdaqiW|sÆtdtjddƒdSx|D]}t|ƒqÍWdS)NéZqvz-qz-vzUsage:rz[-v] file_or_directory ...)Úgetoptr ÚargvÚerrorrÚ filename_onlyÚverboser)ZoptsrÚmsgÚoÚarrrrÚmain*s)     rc@sFeZdZdZdd„Zdd„Zdd„Zdd „Zd S) rzk Raised by process_tokens() if detecting an ambiguous indent. Captured and handled in check(). cCs!||||_|_|_dS)N)ÚlinenorÚline)ÚselfrrrrrrÚ__init__AszNannyNag.__init__cCs|jS)N)r)r rrrÚ get_linenoCszNannyNag.get_linenocCs|jS)N)r)r rrrÚget_msgEszNannyNag.get_msgcCs|jS)N)r)r rrrÚget_lineGszNannyNag.get_lineN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r!r"r#r$rrrrr<s    c %Csºtjj|ƒrÆtjj|ƒ rÆtr<td|fƒtj|ƒ}xt|D]l}tjj||ƒ}tjj|ƒr’tjj|ƒ s´tjj|dd…ƒdkrRt |ƒqRWdSyt j |ƒ}Wn=t k r}zt d||fƒdSWYdd}~XnXtdkr3td|ƒz^ytt j|jƒƒWn=t jk r’}zt d||fƒdSWYdd}~Xnþtk rÎ}zt d ||fƒdSWYdd}~XnÂtk r�}z¢|jƒ}|jƒ}tr6td ||fƒtd |fƒt|jƒƒnCd |krPd |d }trct|ƒnt||t|ƒƒdSWYdd}~XnXWd|jƒXtr¶td|fƒdS)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%r: listing directoryéNz.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ÚbadlinerrrrrJsT % "      c@speZdZd\ZZdd„Zdd„Zdd„Zdd „Zd d „Z d d „Z dd„Z dS)Ú Whitespacez c Cs||_tjtj}}g}d}}}x¡|jD]–}||krc|d}|d}q:||krÏ|d}|d}|t|ƒkr´|dg|t|ƒd}||d||sz#format_witnesses..z at tab sizerÚsrz, )rGr2)ÚwZfirstsÚprefixrrrÚformat_witnesses s  rdcCs�tj}tj}tj}tjtjf}tdƒg}d}x8|D]0\}}} } } ||krsd}qI||kríd}t|ƒ} |dj| ƒsÝ|dj| ƒ} dt | ƒ}t | d|| ƒ‚|j | ƒqI||kr d}|d=qI|rI||krId}t| ƒ} |d j | ƒsI|d j | ƒ} dt | ƒ}t | d|| ƒ‚qIWdS) Nrrrzindent not greater e.g. zindent not equal e.g. éÿÿÿÿrererere)r4ÚINDENTÚDEDENTÚNEWLINEÚCOMMENTrrCr\r]rdrrXrWrZ)ÚtokensrfrgrhZJUNKÚindentsZ check_equalÚtypeÚtokenÚstartÚendrZthisguyZwitnessrrrrrs6          Ú__main__)r(Ú __version__r,r rr4ÚhasattrÚ ValueErrorÚ__all__rrrrÚ ExceptionrrrCrdrr%rrrrÚ s&        =†  7