bgD rdZddlmZmZmZmZddlmZddlm Z m Z ddlm Z ddl m Z GddeZd S) a Fixer for import statements, with a __future__ import line. Based on lib2to3/fixes/fix_import.py, but extended slightly so it also supports Cython modules. If spam is being imported from the local directory, this import: from spam import eggs becomes: from __future__ import absolute_import from .spam import eggs and this import: import spam becomes: from __future__ import absolute_import from . import spam )dirnamejoinexistssep) FixImport) FromImportsyms)traverse_imports) future_importceZdZdZdZdZdS)FixAbsoluteImport c@|jrdS|d}|jtjkr~t |ds|jd}t |d||jr5d|jz|_|td|dSdSd}d}t|D]}||rd}d}|r|r| |d dStd|g}|j |_ td||S) z Copied from FixImport.transform(), but with this line added in any modules that had implicit relative imports changed: from __future__ import absolute_import" Nimpvaluer.absolute_importFTz#absolute and local imports together)skiptyper import_fromhasattrchildrenprobably_a_local_importrchangedr r warningrprefix)selfnoderesultsr have_local have_absolutemod_namenews v/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/libfuturize/fixes/fix_absolute_import.py transformzFixAbsoluteImport.transformsW 9  Fen 9( ( ( c7++ &l1oc7++ &++CI66 8 39,  0$77777 8 8 J!M,S11 ) )//99)!%JJ$(MM NLL'LMMMTC5))CCJ ,d 3 3 3JcX|drdS|ddd}t|j}t ||}t t t|dsdSdt ddd d d fD]}t ||zrd SdS) zq Like the corresponding method in the base class, but this also supports Cython modules. rFrz __init__.pyz.pyz.pycz.soz.slz.pydz.pyxT) startswithsplitrfilenamerrr)rimp_name base_pathexts r$rz)FixAbsoluteImport.probably_a_local_importIs   t $ $ 5>>$**1-DM** H-- d79--}==>> 53uffE  Ci#o&& tt ur&N)__name__ __module__ __qualname__ run_orderr%rr&r$r r s8I(((Tr&r N)__doc__os.pathrrrrlib2to3.fixes.fix_importrlib2to3.fixer_utilrr r libfuturize.fixer_utilr r r3r&r$r9s&/.................////////555555000000????? ?????r&