B � f��@s6dZddlmZddlmZmZGdd�dej�ZdS)zuFixer that addes parentheses where they are required This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.�)� fixer_base)�LParen�RParenc@seZdZdZdZdd�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] > >) (']' | ')') > cCs8|d}t�}|j|_d|_|�d|�|�t��dS)N�target��)r�prefixZ insert_childZ append_childr)�selfZnodeZresultsrZlparen�r �s