Файловый менеджер - Редактировать - /usr/lib/python3/dist-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-310.pyc
Ðазад
o !��h� � @ s� d dl mZ d dlmZmZmZmZ d dlmZ d dl m Z d dlmZ dede de fd d �Zde defdd �Z ddedee dedefdd�ZdS )� )�Optional)�ArchiveInfo� DirectUrl�DirInfo�VcsInfo)�Link)�path_to_url)�vcs� direct_url�name�returnc C s� | � � |d }g }t| jt�r|d�| jj| j| jj�7 }n$t| jt�r6|| j7 }| jj r5|� | jj � n t| jt�s>J �|| j7 }| jrN|� d| j � |rY|dd� |� 7 }|S )z0Convert a DirectUrl to a pip requirement string.z @ z{}+{}@{}z subdirectory=�#�&)�validate� isinstance�infor �formatr �url� commit_idr �hash�appendr �subdirectory�join)r r �requirement� fragments� r �H/usr/lib/python3/dist-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_reference s&