관리-도구
편집 파일: direct_url.cpython-311.pyc
� �܋f� � �F � d Z ddlZddlZddlZddlmZ ddlmZm Z m Z mZmZm Z mZmZ g d�Z ed� � ZdZ ej d� � Z G d � d e� � Z dde eef de e d edee dee f d�Z dde eef de e d edee def d�Zdeed ddfd�Zdede eef fd�Ze G d� d� � � � Z G d� d� � Ze G d� d� � � � Zeeeef Ze G d� d� � � � Z dS ) z PEP 610 � N)� dataclass)�Any�ClassVar�Dict�Iterable�Optional�Type�TypeVar�Union)� DirectUrl�DirectUrlValidationError�DirInfo�ArchiveInfo�VcsInfo�Tzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$c � � e Zd ZdS )r N)�__name__� __module__�__qualname__� � �V/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_internal/models/direct_url.pyr r s � � � � � ��Dr r �d� expected_type�key�default�returnc �r � || vr|S | | }t ||� � st |�d|� d|� d�� � �|S )z3Get value from dictionary and verify expected type.z has unexpected type for z (expected �))� isinstancer �r r r r �values r �_getr# sb � � �!�|�|��� �c�F�E��e�]�+�+� �&��Q�Q��Q�Q��Q�Q�Q� � � � �Lr c �R � t | |||� � }|�t |� d�� � �|S )Nz must have a value)r# r r! s r � _get_requiredr% ) s8 � � ��M�3��0�0�E��}�&�#�'A�'A�'A�B�B�B��Lr �infos�InfoTypec � � d� | D � � } | st d� � �t | � � dk rt d� � �| d �J �| d S )Nc � � g | ]}|�|��S �Nr )�.0�infos r � <listcomp>z#_exactly_one_of.<locals>.<listcomp>3 s � �8�8�8�d�t�'7�T�'7�'7�'7r z/missing one of archive_info, dir_info, vcs_info� z1more than one of archive_info, dir_info, vcs_infor )r �len)r&