Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/libfuturize/fixes/__pycache__/fix_absolute_import.cpython-39.pyc
Ðазад
a h�hD � @ sd d Z ddlmZmZmZmZ ddlmZ ddlm Z m Z ddlmZ ddlm Z G dd� de�Zd 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 Zd ZdZdd� Zdd� ZdS )�FixAbsoluteImport� c C s� | j r dS |d }|jtjkr`t|d�s4|jd }q| �|j�r�d|j |_|�� t d|� ndd}d}t |�D ]}| �|�r�d}qpd}qp|r�|r�| �|d � dS td|g�}|j |_ t d|� |S dS ) 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 �.�absolute_importFTz#absolute and local imports together)�skip�typer Zimport_from�hasattr�children�probably_a_local_importr �changedr r �warningr �prefix)�self�node�resultsr Z have_localZ have_absolute�mod_name�new� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/libfuturize/fixes/fix_absolute_import.py� transform s0 zFixAbsoluteImport.transformc C sv |� d�rdS |�dd�d }t| j�}t||�}ttt|�d��sHdS dtddd d dfD ]}t|| �rZ dS qZdS ) 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 Zimp_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__�os.pathr r r r Zlib2to3.fixes.fix_importr Zlib2to3.fixer_utilr r r Zlibfuturize.fixer_utilr r r r r r �<module> s
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка