ok
Direktori : /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_import.cpython-311.pyc |
� �f� � �n � d Z ddlmZ ddlmZmZmZmZ ddlm Z m Z mZ d� Z G d� dej � � Zd S ) z�Fixer for import statements. If spam is being imported from the local directory, this import: from spam import eggs Becomes: from .spam import eggs And this import: import spam Becomes: from . import spam � )� fixer_base� )�dirname�join�exists�sep)� FromImport�syms�tokenc # � K � | g}|r�|� � � }|j t j k r |j V � n�|j t j k r'd� d� |j D � � � � V � n~|j t j k r!|� |j d � � nH|j t j k r$|� |j ddd� � � nt d� � �|��dS dS )zF Walks over all the names imported in a dotted_as_names node. � c � � g | ] }|j �� S � )�value)�.0�chs �?/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_import.py� <listcomp>z$traverse_imports.<locals>.<listcomp> s � �<�<�<��2�8�<�<�<� r N���zunknown node type)�pop�typer �NAMEr r �dotted_namer �children�dotted_as_name�append�dotted_as_names�extend�AssertionError)�names�pending�nodes r �traverse_importsr$ s � � � � �g�G� � 6��{�{�}�}���9�� �"�"��*����� �Y�$�*� *� *��'�'�<�<�d�m�<�<�<�=�=�=�=�=�=� �Y�$�-� -� -��N�N�4�=��+�,�,�,�,� �Y�$�.� .� .��N�N�4�=���2��.�/�/�/�/� �!4�5�5�5� � 6� 6� 6� 6� 6r c �2 � � e Zd ZdZdZ� fd�Zd� Zd� Z� xZS )� FixImportTzj import_from< 'from' imp=any 'import' ['('] any [')'] > | import_name< 'import' imp=any > c �v �� t t | � � � ||� � d|j v | _ d S )N�absolute_import)�superr&