MINI MINI MANI MO
3
\Ë ã @ s6 d Z ddlmZ ddlmZmZ G dd„ 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 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|_|jd|ƒ |jtƒ ƒ d S )NÚtargetÚ é )r ÚprefixZinsert_childZappend_childr )ÚselfZnodeZresultsr Zlparen© r ú//usr/lib64/python3.6/lib2to3/fixes/fix_paren.pyÚ transform% s zFixParen.transformN)Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZPATTERNr
r r r r r s r N)Ú__doc__r r Z
fixer_utilr r ZBaseFixr r r r r Ú<module> s
OHA YOOOO