Viewing File: /opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/fix_paren.cpython-38.opt-1.pyc

U

¡ê,aËã@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ú</opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_paren.pyÚ	transform%szFixParen.transformN)Ú__name__Ú
__module__Ú__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)Ú__doc__rrZ
fixer_utilrrZBaseFixrrrrrÚ<module>s
Back to Directory File Manager