U e5d@sjddlZddlZddlZddlZdddgZdddZiaddZdddZdd dZ dd d Z d d Z dS)Ngetline clearcache checkcachecCs:t||}d|kr"t|kr2nn ||dSdSdS)N)getlineslen)filenamelinenomodule_globalslinesr !/usr/lib64/python3.8/linecache.pyrs  cCsiadS)N)cacher r r rrscCsX|tkr(t|}t|dkr(t|dSz t||WStk rRtgYSXdS)Nr)rr updatecache MemoryErrorr)r r entryr r rr%s   rc Cs|dkrtt}n|tkr&|g}ndS|D]}t|}t|dkrHq.|\}}}}|dkr^q.zt|}Wn$tk rt|dYq.YnX||jks||j kr.t|dq.dS)Nr) listrkeysrosstatOSErrorpopst_sizest_mtime)r filenamesrsizemtimer fullnamerr r rr5s&    c Cs|tkr$tt|dkr$t|d|r<|dr@|dr@gS|}zt|}Wntk rn|}t||rzt|d}Wnt tfk rYnDX|dkrgYSt|ddd| D|ft|<t|dYStj |rgYSt j D]d}ztj ||}Wnttfk r0YqYnXzt|}WqjWqtk r^YqXqgYSYnXz"t|}|}W5QRXWntk rgYSX|r|dd s|dd 7<|j|j} } | | ||ft|<|S) Nr<>rcSsg|] }|dqS) r ).0liner r r qszupdatecache..rr")rrr startswithendswithrrr lazycache ImportError splitlinespathisabssysjoin TypeErrorAttributeErrortokenizeopen readlinesrr) r r rrbasenamedatadirnamefpr rrr r rrRs\         rcCs|tkr tt|dkrdSdS|r8|dr<|drr.rr2__all__rrrrrrr)r r r rs     A