HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/utils/__pycache__/urls.cpython-310.pyc
o

@%Ne��@svddlZddlZddlZddlZddlmZddlmZde	dee	fdd�Z
d	e	de	fd
d�Zde	de	fdd
�ZdS)�N)�Optional�)�WINDOWS�url�returncCs d|vrdS|�dd�d��S)N�:rr)�split�lower)r�r
�:/usr/lib/python3/dist-packages/pip/_internal/utils/urls.py�get_url_scheme
sr�pathcCs.tj�tj�|��}tj�dtj�|��}|S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    �file:)	�osr
�normpath�abspath�urllib�parse�urljoin�request�pathname2url)r
rr
r
r�path_to_urlsrcCs�|�d�s
Jd|�d���tj�|�\}}}}}|r|dkr!d}ntr(d|}ntd|����tj�||�}tr\|s\t|�dkr\|d	d
kr\|dt	j
vr\|dd
�dvr\|dd�}|S)z(
    Convert a file: URL to a path.
    rz1You can only turn file: urls into filenames (not �)�	localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)rz:/N)�
startswithrr�urlsplitr�
ValueErrorr�url2pathname�len�string�
ascii_letters)r�_�netlocr
r
r
r�url_to_paths0�
�
���r()
rr$�urllib.parser�urllib.request�typingr�compatr�strrrr(r
r
r
r�<module>s