관리-도구
편집 파일: urls.cpython-39.opt-1.pyc
a [��f� � @ sp d dl Z d dlZd dlZd dlZd dlmZ ddlmZ e ee d�dd�Z e e d�d d �Ze e d�dd�ZdS ) � N)�Optional� )�WINDOWS)�url�returnc C s d| vrd S | � dd�d �� S )N�:r r )�split�lower)r � r �</usr/lib/python3.9/site-packages/pip/_internal/utils/urls.py�get_url_scheme s r )�pathr c C s. t j�t j�| ��} tj�dtj�| ��}|S )zh Convert a path to a file: URL. The path will be made absolute and have quoted path parts. zfile:) �osr �normpath�abspath�urllib�parse�urljoin�requestZpathname2url)r r r r r �path_to_url s r c C s� t j�| �\}}}}}|r"|dkr(d}ntr6d| }ntd| ����t j�|| �}tr�|s�t|�dkr�|d dkr�|d tj v r�|d d � dv r�|dd� }|S ) z( Convert a file: URL to a path. Z localhost� z\\z8non-local file URIs are not supported on this platform: � r �/r � � )r z:/N) r r �urlsplitr � ValueErrorr Zurl2pathname�len�string� ascii_letters)r �_�netlocr r r r �url_to_path s. ��� � ���r"