Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-37.pyc
Назад
B �5�g# � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl mZ d dlm Z d dlmZmZ e�e�ZG dd� d�ZdS ) � N)�List)�canonicalize_name)�PyPI)�has_tls)�normalize_path�redact_auth_from_urlc @ sx e Zd ZdZdddgZeee ee ed d�dd��Z ee ee edd�d d �Z ed�dd �Zeee d�dd�ZdS )�SearchScopezF Encapsulates the locations that pip is configured to search. � find_links� index_urls�no_index)r r r �returnc C s� g }x8|D ]0}|� d�r0t|�}tj�|�r0|}|�|� q W t� s|x6t�||�D ]&}t j �|�}|jdkrRt �d� P qRW | |||d�S )zQ Create a SearchScope object after normalizing the `find_links`. �~�httpszipip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.)r r r )� startswithr �os�path�exists�appendr � itertools�chain�urllib�parse�urlparse�scheme�logger�warning)�clsr r r Zbuilt_find_links�link�new_link�parsed� r �B/tmp/pip-install-251nq386/pip/pip/_internal/models/search_scope.py�create s$ zSearchScope.createNc C s || _ || _|| _d S )N)r r r )�selfr r r r r r! �__init__C s zSearchScope.__init__)r c C s� g }g }| j rx| j tjgkrxxD| j D ]:}t|�}tj�|�}|jsT|jsTt � d|� |�|� q$W |�d�d� |��� | jr�|�d�d� dd� | jD ���� d� |�S )Nz:The index url "%s" seems invalid, please provide a scheme.zLooking in indexes: {}z, zLooking in links: {}c s s | ]}t |�V qd S )N)r )�.0�urlr r r! � <genexpr>k s z6SearchScope.get_formatted_locations.<locals>.<genexpr>� )r r � simple_urlr r r �urlsplitr �netlocr r r �format�joinr )r# �linesZredacted_index_urlsr&