U if @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] ) fixer_base)AttrCallNameNumber SubscriptNodesymsc@s:eZdZdddgZdZddddeDZd d Zd S) FixSysExcexc_type exc_value exc_tracebackTzN power< 'sys' trailer< dot='.' attribute=(%s) > > |ccs|]}d|VqdS)z'%s'N).0err>/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_sys_exc.py szFixSysExc.cCst|dd}t|j|j}ttd|jd}ttd|}|dj|djd_| t |t t j ||jdS)NZ attributeexc_info)prefixsysdot)rrindexvaluerrrrZchildrenappendrrr Zpower)selfZnodeZresultsZsys_attrrZcallattrrrr transforms zFixSysExc.transformN)__name__ __module__ __qualname__rZ BM_compatiblejoinZPATTERNrrrrrr s  r N) __doc__rZ fixer_utilrrrrrrr ZBaseFixr rrrrs $