î j fËã@sIdZddlmZddlmZmZGdd„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@s(eZdZdZdZdd„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] > >) (']' | ')') > cCsL|d}tƒ}|j|_d|_|jd|ƒ|jtƒƒdS)NÚtargetÚé)rÚprefixZ insert_childZ append_childr)ÚselfZnodeZresultsrZlparen©r ús