← Back
Editing: imports.cpython-311.pyc
� �=Xc� � �N � d dl mZ d dlZd dlmZmZmZmZ dgZdd�Z ddd�Z dS )� )�annotationsN)�Any�Dict�Iterable�Optional�lazy_import�name�str�source� namespace�Dict[str, Any]�returnr c �� � d}|| dk r.|dz }|t |� � k s J d� � �|| dk �.t ||d� |d| g|� � }t || � � S )aN Import ``name`` from ``source`` in ``namespace``. There are two use cases: - ``name`` is an object defined in ``source``; - ``name`` is a submodule of ``source``. Neither :func:`__import__` nor :func:`~importlib.import_module` does exactly this. :func:`__import__` is closer to the intended behavior. r �.� z%importing from parent isn't supportedN)�len� __import__�getattr)r r r �level�modules �4/usr/lib/python3/dist-packages/websockets/imports.py�import_namer s� � � �E� ��-�3� � � �� ���s�6�{�{�"�"�"�$K�"�"�"� ��-�3� � � ��u�v�v�� �4�$��� G� G�F��6�4� � � � �aliases�Optional[Dict[str, str]]�deprecated_aliases�Nonec � � ������� ��i ���i �t � � � �t �� � �t �� � ���z r J d� � ���z r J d� � ���z r J d� � �� d �d ��� �fd�}|� d <