a
    $lJh                     @  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   \/var/www/shaz/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   