<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    ÍAÒ[D  ã               @   sd   d Z ddlmZmZmZmZ ddlmZ ddlm	Z	m
Z
 ddlmZ ddlmZ G dd„ deƒZd	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
é    )ÚdirnameÚjoinÚexistsÚsep)Ú	FixImport)Ú
FromImportÚsyms)Útraverse_imports)Úfuture_importc               @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚFixAbsoluteImporté	   c             C   sÐ   | j r
dS |d }|jtjkrdxt|dƒs6|jd }q W |  |j¡rÌd|j |_| ¡  t	d|ƒ nhd}d}x$t
|ƒD ]}|  |¡rŠd}qvd}qvW |rª|r¦|  |d	¡ dS td|gƒ}|j|_t	d|ƒ |S d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"
        NÚimpÚvaluer   Ú.Zabsolute_importFTz#absolute and local imports together)ÚskipÚtyper   Zimport_fromÚhasattrZchildrenÚprobably_a_local_importr   Úchangedr
   r	   Zwarningr   Úprefix)ÚselfZnodeZresultsr   Z
have_localZhave_absoluteZmod_nameÚnew© r   úV/opt/alt/python37/lib/python3.7/site-packages/libfuturize/fixes/fix_absolute_import.pyÚ	transform   s0    

zFixAbsoluteImport.transformc             C   sx   |  d¡rdS | dd¡d }t| jƒ}t||ƒ}ttt|ƒdƒƒsHdS x*dtddd	d
dgD ]}t|| ƒr\dS q\W dS )zq
        Like the corresponding method in the base class, but this also
        supports Cython modules.
        r   Fé   r   z__init__.pyz.pyz.pycz.soz.slz.pydz.pyxT)Ú
startswithÚsplitr   Úfilenamer   r   r   )r   Zimp_nameÚ	base_pathÚextr   r   r   r   I   s    


z)FixAbsoluteImport.probably_a_local_importN)Ú__name__Ú
__module__Ú__qualname__Z	run_orderr   r   r   r   r   r   r      s   *r   N)Ú__doc__Zos.pathr   r   r   r   Zlib2to3.fixes.fix_importr   Zlib2to3.fixer_utilr   r   r	   Zlibfuturize.fixer_utilr
   r   r   r   r   r   Ú<module>   s   