← Back
Editing: direct_url.cpython-312.pyc
� &��j}- � � � d dl mZ d dlZd dlZd dlZd dlmZ d dlm Z m Z mZmZ e r,d dl Z d dlmZ d dlmZ e j dk\ rd dlmZ nd dlmZ g d �Zd'd �Z ed� Z G d� d e� Z ede�� Zd(d�Zd)d�Zd*d�Z d+d�Z ej8 d� Zd,d�Zd-d�Zd.d�Z G d� de!� Z" G d� de"� Z# ejH dd�� G d� d � � Z% ejH dd�� G d!� d"� � Z& ejH dd�� G d#� d$� � Z' ejH dd�� G d%� d&� � Z(y)/� )�annotationsN)�Mapping)� TYPE_CHECKING�Any�Protocol�TypeVar)� Collection)�SplitResult)� � )�Self)�ArchiveInfo�DirInfo� DirectUrl�DirectUrlValidationError�VcsInfoc � � t S �N)�__all__� � �P/root/parts/certbot/install/lib/python3.12/site-packages/packaging/direct_url.py�__dir__r s � ��Nr �_Tc � � e Zd Zedd�� Zy)�_FromMappingProtocolc � � y r r ��cls�ds r � _from_dictz_FromMappingProtocol._from_dict$ s � �7:r N�r �Mapping[str, Any]�returnr )�__name__� __module__�__qualname__�classmethodr! r r r r r # s � ��:� �:r r �_FromMappingProtocolT)�boundc �@ � | D ��ci c] \ }}|�� ||�� c}}S c c}}w r r )�data�key�values r �_json_dict_factoryr/ + s# � �)-�C�:�3���1B�C��J�C�C��Cs � �c � � | j |� x}�yt ||� s1t dt |� j � d|j � d�|�� �|S )zBGet a value from the dictionary and verify it's the expected type.NzUnexpected type z (expected �)��context)�get� isinstancer �typer% �r � expected_typer- r. s r �_getr9 / sc � ����s����$���e�]�+�&��t�E�{�3�3�4� 5�&�/�/�0�� 3�� � � �Lr c �: � t | ||� x}�t |� �|S )zKGet a required value from the dictionary and verify it's the expected type.)r9 �_DirectUrlRequiredKeyErrorr7 s r � _get_requiredr<