a
    <Bìjè  ã                   @  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                   @  sN   e Zd ZdZdddddœdd„Zd	d
œdd„Zdd
œdd„Zd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.
    zIterable[CT]z*Collection[RequirementInformation[RT, CT]]zCollection[CT]ÚNone)Ú
candidatesÚinformationÚincompatibilitiesÚreturnc                 C  s   || _ || _|| _d S ©N)r   r   r   )Úselfr   r   r   © r   úi/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers/criterion.pyÚ__init__   s    zCriterion.__init__Ústr)r   c                 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__zIterator[RT]c                 C  s   dd„ | j D ƒS )Nc                 s  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,   s    zCriterion.iter_requirementzIterator[CT | None]c                 C  s   dd„ | j D ƒS )Nc                 s  s   | ]}|j V  qd S r   )r   r!   r   r   r   r   0   r#   z(Criterion.iter_parent.<locals>.<genexpr>r$   r%   r   r   r   Úiter_parent/   s    zCriterion.iter_parentN)Ú__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   