Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /opt/alt/python38/lib64/python3.8/lib2to3/fixes/__pycache__/ |
U ��,a� � @ sZ d Z ddlmZ ddlmZmZmZmZ ddlm Z m Z mZ dd� ZG dd � d ej �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 c s� | g}|r�|� � }|jtjkr(|jV q|jtjkrNd�dd� |jD ��V q|jtj krl|� |jd � q|jtjkr�|�|jddd� � qt d��qdS )zF Walks over all the names imported in a dotted_as_names node. � c S s g | ] }|j �qS � )�value)�.0Zchr r �=/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_import.py� <listcomp> s z$traverse_imports.<locals>.<listcomp>r N���zunknown node type)�pop�typer �NAMEr r Zdotted_namer �childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�namesZpending�noder r r �traverse_imports s r c s4 e Zd ZdZdZ� fdd�Zdd� Zdd� Z� ZS ) � FixImportTzj import_from< 'from' imp=any 'import' ['('] any [')'] > | import_name< 'import' imp=any > c s"