a
    ªða  ã                   @   s    d dl mZ G dd„ deƒZdS )é   )ÚDistributionc                       s$   e Zd Z‡ fdd„Zdd„ Z‡  ZS )ÚIndexc                    sH   t |tƒstd| ƒ‚|d|j|jf kr2tdƒ‚tt| ƒ ||¡ d S )NzNot a distribution: %r.ú%s-%sz Key must match <name>-<version>.)Ú
isinstancer   Ú
ValueErrorÚnameÚversionÚsuperr   Ú__setitem__)ÚselfÚkeyÚvalue©Ú	__class__© ú,lib/python3.9/site-packages/pkginfo/index.pyr
      s
    
zIndex.__setitem__c                 C   s   d|j |jf }|| |< d S )Nr   )r   r   )r   Údistributionr   r   r   r   Úadd   s    z	Index.add)Ú__name__Ú
__module__Ú__qualname__r
   r   Ú__classcell__r   r   r   r   r      s   r   N)r   r   Údictr   r   r   r   r   Ú<module>   s   