/usr/lib/python3.10/lib2to3/fixes/__pycache__
NameSizeModeActions
fix_apply.cpython-310.pyc16520644editdlrm
fix_asserts.cpython-310.pyc12770644editdlrm
fix_basestring.cpython-310.pyc6610644editdlrm
fix_buffer.cpython-310.pyc8060644editdlrm
fix_dict.cpython-310.pyc32870644editdlrm
fix_except.cpython-310.pyc27720644editdlrm
fix_exec.cpython-310.pyc11310644editdlrm
fix_execfile.cpython-310.pyc16770644editdlrm
fix_exitfunc.cpython-310.pyc23060644editdlrm
fix_filter.cpython-310.pyc24400644editdlrm
fix_funcattrs.cpython-310.pyc9740644editdlrm
fix_future.cpython-310.pyc7820644editdlrm
fix_getcwdu.cpython-310.pyc7860644editdlrm
fix_has_key.cpython-310.pyc28770644editdlrm
fix_idioms.cpython-310.pyc39050644editdlrm
fix_import.cpython-310.pyc28110644editdlrm
fix_imports.cpython-310.pyc46270644editdlrm
fix_imports2.cpython-310.pyc5440644editdlrm
fix_input.cpython-310.pyc9480644editdlrm
fix_intern.cpython-310.pyc11300644editdlrm
fix_isinstance.cpython-310.pyc15550644editdlrm
fix_itertools.cpython-310.pyc15460644editdlrm
fix_itertools_imports.cpython-310.pyc15660644editdlrm
fix_long.cpython-310.pyc7090644editdlrm
fix_map.cpython-310.pyc30750644editdlrm
fix_metaclass.cpython-310.pyc54050644editdlrm
fix_methodattrs.cpython-310.pyc9360644editdlrm
fix_ne.cpython-310.pyc8090644editdlrm
fix_next.cpython-310.pyc30770644editdlrm
fix_nonzero.cpython-310.pyc9210644editdlrm
fix_numliterals.cpython-310.pyc10210644editdlrm
fix_operator.cpython-310.pyc41520644editdlrm
fix_paren.cpython-310.pyc13870644editdlrm
fix_print.cpython-310.pyc23090644editdlrm
fix_raise.cpython-310.pyc22490644editdlrm
fix_raw_input.cpython-310.pyc7930644editdlrm
fix_reduce.cpython-310.pyc11260644editdlrm
fix_reload.cpython-310.pyc11420644editdlrm
fix_renames.cpython-310.pyc20250644editdlrm
fix_repr.cpython-310.pyc8430644editdlrm
fix_set_literal.cpython-310.pyc16830644editdlrm
fix_standarderror.cpython-310.pyc7180644editdlrm
fix_sys_exc.cpython-310.pyc14110644editdlrm
fix_throw.cpython-310.pyc18060644editdlrm
fix_tuple_params.cpython-310.pyc45890644editdlrm
fix_types.cpython-310.pyc19410644editdlrm
fix_unicode.cpython-310.pyc15530644editdlrm
fix_urllib.cpython-310.pyc58800644editdlrm
fix_ws_comma.cpython-310.pyc11170644editdlrm
fix_xrange.cpython-310.pyc25270644editdlrm
fix_xreadlines.cpython-310.pyc11210644editdlrm
fix_zip.cpython-310.pyc15790644editdlrm
__init__.cpython-310.pyc1380644editdlrm
Edit: /usr/lib/python3.10/lib2to3/fixes/__pycache__/fix_tuple_params.cpython-310.pyc (4589B)
o bc@sdZddlmZddlmZddlmZddlmZmZm Z m Z m Z m Z ddZ Gdd d ejZd d Zd d ZgdfddZddZdS)a:Fixer for function definitions with tuple parameters. def func(((a, b), c), d): ... -> def func(x, d): ((a, b), c) = x ... It will also support lambdas: lambda (x, y): x + y -> lambda t: t[0] + t[1] # The parens are a syntax error in Python 3 lambda (x): x + y -> lambda x: x + y )pytree)token) fixer_base)AssignNameNewlineNumber SubscriptsymscCst|tjo|jdjtjkS)N) isinstancerNodechildrentyperSTRING)stmtr5/usr/lib/python3.10/lib2to3/fixes/fix_tuple_params.py is_docstrings rc@s(eZdZdZdZdZddZddZdS) FixTupleParamsTa funcdef< 'def' any parameters< '(' args=any ')' > ['->' any] ':' suite=any+ > | lambda= lambdef< 'lambda' args=vfpdef< '(' inner=any ')' > ':' body=any > c sd|vr ||Sg|d}|d}|djdjtjkr-d}|djdj}tn d}d}ttjddfd d }|jt j krL||n|jt j krjt |jD]\}} | jt j kri|| |dkd qWsndSD]} |d| _ qp|} |dkrd d_nt|dj|r|d_|d} D]} |d| _ q|dj| | <t| d| tdD] }||dj|_q|ddS)Nlambdasuiteargsr rz; Fcs\t}|}d|_t||}|rd|_||tt j |gdS)Nr ) rnew_namecloneprefixrreplaceappendrr r simple_stmt) tuple_arg add_prefixnargrend new_linesselfrr handle_tupleCs     z.FixTupleParams.transform..handle_tuple)r$r)F)transform_lambdarrrINDENTvaluerrLeafr tfpdef typedargslist enumerateparentrrrangelenchanged) r*noderesultsrrstartindentr+ir&lineafterrr'r transform.sH        zFixTupleParams.transformc Cs|d}|d}t|d}|jtjkr"|}d|_||dSt|}t|}| t |}t |dd} || | D],} | jtjkrn| j |vrndd|| j D} ttj| g| } | j| _| | qBdS)Nrbodyinnerr)rcSsg|]}|qSr)r.0crrr sz3FixTupleParams.transform_lambda..) simplify_argsrrNAMErrr find_params map_to_indexr tuple_namer post_orderr.rr r power) r*r7r8rr?r@paramsto_indextup_name new_paramr% subscriptsnewrrrr,ns.       zFixTupleParams.transform_lambdaN)__name__ __module__ __qualname__ run_order BM_compatiblePATTERNr>r,rrrrrs  @rcCsT|jtjtjfvr |S|jtjkr$|jtjkr"|jd}|jtjks|Std|)NrzReceived unexpected node %s)rr vfplistrrFvfpdefr RuntimeErrorr7rrrrEs     rEcCs<|jtjkr t|jdS|jtjkr|jSdd|jDS)NrcSs g|] }|jtjkrt|qSr)rrCOMMArGrArrrrDs zfind_params..)rr rYrGrrrFr.r[rrrrGs  rGNcCsZ|duri}t|D] \}}ttt|g}t|tr$t|||dq ||||<q |S)N)d)r2r rstrr listrH) param_listrr]r;objtrailerrrrrHs rHcCs<g}|D]}t|tr|t|q||qd|S)N_)r r_r!rIjoin)r`lrarrrrIs    rI)__doc__rrpgen2rr fixer_utilrrrrr r rBaseFixrrErGrHrIrrrrs    l