관리-도구
편집 파일: direct_url.cpython-39.pyc
a ��Re� � @ s< d Z ddlZddlZddlZddlmZmZmZm Z m Z mZmZ g d�Z ed�ZdZe�d�ZG dd � d e�Zdeeef e e ee e e e d �dd�Zdeeef e e ee e ed �d d�Zee d dd�dd�Zeeeef d�dd�ZG dd� d�ZG dd� d�ZG dd� d�Zeeeef ZG dd� d�ZdS ) z PEP 610 � N)�Any�Dict�Iterable�Optional�Type�TypeVar�Union)� DirectUrl�DirectUrlValidationError�DirInfo�ArchiveInfo�VcsInfo�Tzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$c @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/models/direct_url.pyr s r )�d� expected_type�key�default�returnc C s4 || vr|S | | }t ||�s0td�|||���|S )z3Get value from dictionary and verify expected type.z-{!r} has unexpected type for {} (expected {}))� isinstancer �format�r r r r �valuer r r �_get s ��r c C s( t | |||�}|d u r$t|� d���|S )Nz must have a value)r r r r r r � _get_required) s r �InfoType)�infosr c C sF dd� | D �} | st d��t| �dkr.t d��| d d us>J �| d S )Nc S s g | ]}|d ur|�qS �Nr )�.0�infor r r � <listcomp>3 � z#_exactly_one_of.<locals>.<listcomp>z/missing one of archive_info, dir_info, vcs_info� z1more than one of archive_info, dir_info, vcs_infor )r �len)r r r r �_exactly_one_of2 s ��r( )�kwargsr c K s dd� | � � D �S )z Make dict excluding None values.c S s i | ]\}}|d ur||�qS r! r )r"