/usr/local/lib/python3.9/site-packages/pip/_internal/utils/__pycache__
a ���h� � @ s� d dl mZ d dlmZmZmZmZ d dlmZ d dl m Z d dlmZ dddd�d d �Z ddd�dd �Zdddddd�dd�ZdS )� )�annotations)�ArchiveInfo� DirectUrl�DirInfo�VcsInfo)�Link)�path_to_url)�vcsr �str)� direct_url�name�returnc C s� | � � |d }g }t| jt�rD|| jj� d| j� d| jj� �7 }nHt| jt�rr|| j7 }| jjr�|� | jj� nt| jt �s�J �|| j7 }| jr�|� d| j � |r�|dd�|� 7 }|S )z0Convert a DirectUrl to a pip requirement string.z @ �+�@z subdirectory=�#�&) �validate� isinstance�infor r �url� commit_idr �hash�appendr �subdirectory�join)r r �requirement� fragments� r �P/usr/local/lib/python3.9/site-packages/pip/_internal/utils/direct_url_helpers.py�%direct_url_as_pep440_direct_reference s$ � r )� source_dirr c C s t t| �tdd�d�S )NT)�editable)r r )r r r )r r r r �direct_url_for_editable s �r"