3 \,@sdZddlZddlZddlZddlZeeds6eddddgZdada dd Z d d Z Gd dde Z d dZGdddZddZddZedkre dS)6NNLz4tokenize.NL doesn't exist -- tokenize module too oldcheckNannyNagprocess_tokenscGs:d}x$|D]}tjj|t|d}q WtjjddS)N  )sysstderrwritestr)argssepargr /usr/lib64/python3.6/tabnanny.pyerrprint#s  rcCsytjtjddd\}}Wn*tjk rH}z t|dSd}~XnXx0|D](\}}|dkrhtda|dkrPtdaqPW|stdtjdddSx|D] }t|qWdS)NZqvz-qz-vzUsage:rz[-v] file_or_directory ...)getoptr argverrorr filename_onlyverboser)Zoptsrmsgoarrrrmain*s  rc@s,eZdZddZddZddZddZd S) rcCs||||_|_|_dS)N)linenorline)selfrrrrrr__init__AszNannyNag.__init__cCs|jS)N)r)r rrr get_linenoCszNannyNag.get_linenocCs|jS)N)r)r rrrget_msgEszNannyNag.get_msgcCs|jS)N)r)r rrrget_lineGszNannyNag.get_lineN)__name__ __module__ __qualname__r!r"r#r$rrrrr<sc %Cs"tjj|rtjj| rtr,td|ftj|}xT|D]L}tjj||}tjj|rhtjj| stjj|dddkrsz#format_witnesses..z at tab sizersrz, )rFr1)wZfirstsprefixrrrformat_witnesses s  rccCstj}tj}tj}tjtjf}tdg}d}x|D]\}}} } } ||krNd}q2||krd}t|} |dj| s|dj| } dt | }t | d|| |j | q2||krd}|d=q2|o||kr2d}t| } |d j | s2|d j | } dt | }t | d|| q2WdS) Nrrrzindent not greater e.g. zindent not equal e.g. rdrdrdrd)r3INDENTDEDENTNEWLINECOMMENTrrBr[r\rcrrWrVrY)tokensrerfrgZJUNKindentsZ check_equaltypetokenstartendrZthisguyZwitnessrrrrrs6       __main__) __version__r+r rr3hasattr ValueError__all__rrrr ExceptionrrrBrcrr%rrrrs&  =7