U e5dŽ, ã @ sœ d Z dZddlZddlZddlZeedƒs2edƒ‚dddgZdada d d „ Z dd„ ZG d d„ deƒZ dd„ ZG dd„ 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_tokensc G s6 d}| D ]}t j |t|ƒ ¡ d}qt j d¡ d S )NÚ ú Ú )ÚsysÚstderrÚwriteÚstr)ÚargsÚsepÚarg© r ú /usr/lib64/python3.8/tabnanny.pyÚerrprint" s r c C s¸ dd l } z| tjdd … d¡\}}W n2 | jk rX } zt|ƒ W Y ¢d S d }~X Y nX |D ](\}}|dkrvtd a|dkr^td aq^|s¢tdtjd dƒ d S |D ]}t|ƒ q¦d S )Nr é Zqvz-qz-vzUsage:z[-v] file_or_directory ...)Úgetoptr ÚargvÚerrorr Ú filename_onlyÚverboser )r Zoptsr ÚmsgÚoÚar r r r Úmain) s r c @ s0 e Zd ZdZdd„ Zdd„ Zdd„ Zdd „ Zd S )r zk Raised by process_tokens() if detecting an ambiguous indent. Captured and handled in check(). c C s ||| | _ | _| _d S ©N)Úlinenor Úline)Úselfr r r r r r Ú__init__B s zNannyNag.__init__c C s | j S r )r ©r! r r r Ú get_linenoD s zNannyNag.get_linenoc C s | j S r )r r# r r r Úget_msgF s zNannyNag.get_msgc C s | j S r )r r# r r r Úget_lineH s zNannyNag.get_lineN)Ú__name__Ú __module__Ú__qualname__Ú__doc__r" r$ r% r&