o 0¦iH ã @ s2 d Z ddlmZ ddlmZ G dd„ dejƒZdS )a, Fixer that cleans up a tuple argument to isinstance after the tokens in it were fixed. This is mainly used to remove double occurrences of tokens as a leftover of the long -> int / unicode -> str conversion. eg. isinstance(x, (int, long)) -> isinstance(x, (int, int)) -> isinstance(x, int) é )Ú fixer_base)Útokenc @ s e Zd ZdZdZdZdd„ ZdS )Ú FixIsinstanceTz˜ power< 'isinstance' trailer< '(' arglist< any ',' atom< '(' args=testlist_gexp< any+ > ')' > > ')' > > é c C sø t ƒ }|d }|j}g }t|ƒ}|D ]8\}} | jtjkr9| j|v r9|t|ƒd k r8||d jtjkr8t |ƒ qq| | ¡ | jtjkrJ| | j¡ q|rX|d jtjkrX|d= t|ƒdkrp|j} | j |d _ | |d ¡ d S ||d d …<