File: //lib/python3/dist-packages/cloudinit/__pycache__/importer.cpython-310.pyc
o
�Ad� � @ s� d dl Z d dlmZ d dlmZmZ dedefdd�Z ddedeee defd d
�Z ddedee d
eee de
fdd�ZdS )� N)�
ModuleType)�Optional�Sequence�module_name�returnc C s
t �| �S �N)� importlib�
import_module)r � r
�4/usr/lib/python3/dist-packages/cloudinit/importer.pyr s
r �attrsc C s6 d}|s|S t �| �}|D ]}t||�r|d7 }q
|S )Nr � )r r �hasattr)r r �found_attrs�mod�attrr
r
r �_count_attrs s
�r � base_name�search_paths�required_attrsc C s� |sg }g }|D ]}g }|r|� |�d�� |�| � d�|�}|�|� qg }|D ]}tj�|�s3q*t||�t|�krA|�|� q*||fS )zFinds specified modules�.) �extend�split�append�joinr �util� find_specr �len)r r r �lookup_paths�path� real_path� full_path�found_pathsr
r
r �find_module! s$
�r# r )r �typesr �typingr r �strr �intr �tupler# r
r
r
r �<module> s,
��
�
����
��