U AT^ @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).0err1/usr/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)selfZnoderesultsZsys_attrrcallattrrrr transforms zFixSysExc.transformN)__name__ __module__ __qualname__rZ BM_compatiblejoinZPATTERNr!rrrrr s  r N) __doc__rZ fixer_utilrrrrrrr ZBaseFixr rrrrs $