o
    6‘ðiè  ã                   @  sT   d dl mZ d dlmZmZmZmZ ddlmZm	Z	m
Z
 G dd„ dee	ef ƒZdS )é    )Úannotations)Ú
CollectionÚGenericÚIterableÚIteratoré   )ÚCTÚRTÚRequirementInformationc                   @  s8   e Zd ZdZdd
d„Zddd„Zddd„Zddd„ZdS )Ú	CriterionaQ  Representation of possible resolution results of a package.

    This holds three attributes:

    * `information` is a collection of `RequirementInformation` pairs.
      Each pair is a requirement contributing to this criterion, and the
      candidate that provides the requirement.
    * `incompatibilities` is a collection of all known not-to-work candidates
      to exclude from consideration.
    * `candidates` is a collection containing all possible candidates deducted
      from the union of contributing requirements and known incompatibilities.
      It should never be empty, except when the criterion is an attribute of a
      raised `RequirementsConflicted` (in which case it is always empty).

    .. note::
        This class is intended to be externally immutable. **Do not** mutate
        any of its attribute containers.
    Ú
candidatesúIterable[CT]Úinformationú*Collection[RequirementInformation[RT, CT]]ÚincompatibilitiesúCollection[CT]ÚreturnÚNonec                 C  s   || _ || _|| _d S ©N)r   r   r   )Úselfr   r   r   © r   úi/root/parts/websockify/install/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers/criterion.pyÚ__init__   s   
zCriterion.__init__Ústrc                 C  s"   d  dd„ | jD ƒ¡}d|› d�S )Nz, c                 s  s&   � | ]\}}d |›d|›d�V  qdS )ú(z, via=ú)Nr   )Ú.0ÚreqÚparentr   r   r   Ú	<genexpr>'   s   € 
ÿz%Criterion.__repr__.<locals>.<genexpr>z
Criterion(r   )Újoinr   )r   Úrequirementsr   r   r   Ú__repr__&   s   
ÿzCriterion.__repr__úIterator[RT]c                 C  ó   dd„ | j D ƒS )Nc                 s  ó   � | ]}|j V  qd S r   )Úrequirement©r   Úir   r   r   r   -   ó   € z-Criterion.iter_requirement.<locals>.<genexpr>©r   ©r   r   r   r   Úiter_requirement,   ó   zCriterion.iter_requirementúIterator[CT | None]c                 C  r$   )Nc                 s  r%   r   )r   r'   r   r   r   r   0   r)   z(Criterion.iter_parent.<locals>.<genexpr>r*   r+   r   r   r   Úiter_parent/   r-   zCriterion.iter_parentN)r   r   r   r   r   r   r   r   )r   r   )r   r#   )r   r.   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r"   r,   r/   r   r   r   r   r      s    



r   N)Ú
__future__r   Útypingr   r   r   r   Ústructsr   r	   r
   r   r   r   r   r   Ú<module>   s    