Your IP : 216.73.216.213
B
a�\j � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl m
Z
dZe�d�Z
e�d�Ze�d �Zd
d� Zdd
� Zdd� Zdd� ZdS )� N)�find_requirements)�RequirementsNotFound)�encoding)�
is_virtualenv)ZdjangoZceleryZflaskz%^\s*from ([\._a-zA-Z0-9]+) import .*$z^\s*import ([\._a-zA-Z0-9]+)$z$^\s*import ([\._a-zA-Z0-9]+(, ){1})+c C s� t � }x�| �d�D ]�}t�|�}|rrg }|�d�}|�|d d� � xZ|�|�d �d�D ]}|�|�� � qZW n.t�|�p�t�|�}|d kr�q|�d��d�}x|D ]}|t kr�|�
|� q�W qW |S )N�
� ����,�.)�set�split�_IMPORT_MULTIPLE_REGEX�match�group�append�strip�
_IMPORT_REGEX�_FROM_IMPORT_REGEX�POSSIBLE_LIBRARIES�add)�
file_contents�names�liner Zimport_names�first�nameZimport_name� r �F/opt/alt/python37/lib/python3.7/site-packages/prospector/autodetect.py�find_from_imports s"