a XC?hÊ ã @ s6 d Z ddlmZ ddlmZmZ G dd„ dejƒZdS )ztFixer that adds parentheses where they are required This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.é )Ú fixer_base)ÚLParenÚRParenc @ s e Zd ZdZdZdd„ ZdS )ÚFixParenTa atom< ('[' | '(') (listmaker< any comp_for< 'for' NAME 'in' target=testlist_safe< any (',' any)+ [','] > [any] > > | testlist_gexp< any comp_for< 'for' NAME 'in' target=testlist_safe< any (',' any)+ [','] > [any] > >) (']' | ')') > c C s8 |d }t ƒ }|j|_d|_| d|¡ | tƒ ¡ d S )NÚtargetÚ é )r ÚprefixZinsert_childZappend_childr )ÚselfZnodeZresultsr Zlparen© r ú