U AT^ c@sJdZddlmZddlmZmZmZmZmZm Z m Z Gdddej Z dS)zFixer for sys.exc_{type, value, traceback} sys.exc_type -> sys.exc_info()[0] sys.exc_value -> sys.exc_info()[1] sys.exc_traceback -> sys.exc_info()[2] i) fixer_base)AttrCallNameNumber SubscriptNodesymsc@s:eZdZdddgZdZddddeDZd d Zd S) FixSysExcZexc_typeZ exc_valueZ exc_tracebackTzN power< 'sys' trailer< dot='.' attribute=(%s) > > z|ccs|]}d|VqdS)z'%s'N)Z.0Zer r 1/usr/lib64/python3.8/lib2to3/fixes/fix_sys_exc.pyZ szFixSysExc.cCst|dd}t|j|j}ttd|jd}ttd|}|dj|djd_| t |t t j ||jdS)NZ attributeiexc_info)prefixZsysZdoti)rr indexZvaluerrr rZchildrenZappendrrrZpower)ZselfZnodeZresultsZsys_attrr ZcallZattrr r r transforms zFixSysExc.transformN)Z__name__Z __module__Z __qualname__r Z BM_compatibleZjoinZPATTERNrr r r r rs  rN) Z__doc__ZrZ fixer_utilrrrrrrrZBaseFixrr r r r Zs $