
    )h                    \    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ee	ef         Zy)    )annotations)
CollectionGenericIterableIterator   )CTRTRequirementInformationc                  @    e Zd ZdZ	 	 	 	 	 	 	 	 ddZddZd	dZd
dZy)	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.
    c                .    || _         || _        || _        y N)
candidatesinformationincompatibilities)selfr   r   r   s       ]/var/www/html/venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py__init__zCriterion.__init__   s     %&!2    c                R    dj                  d | j                  D              }d| dS )Nz, c              3  4   K   | ]  \  }}d |d|d  yw)(z, via=)N ).0reqparents      r   	<genexpr>z%Criterion.__repr__.<locals>.<genexpr>'   s(      !
-8S&awfVJa(!
   z
Criterion(r   )joinr   )r   requirementss     r   __repr__zCriterion.__repr__&   s4    yy !
<@<L<L!
 
 L>++r   c                (    d | j                   D        S )Nc              3  4   K   | ]  }|j                     y wr   )requirementr   is     r   r   z-Criterion.iter_requirement.<locals>.<genexpr>-   s     8!8r    r   r   s    r   iter_requirementzCriterion.iter_requirement,   s    8t'7'788r   c                (    d | j                   D        S )Nc              3  4   K   | ]  }|j                     y wr   )r   r'   s     r   r   z(Criterion.iter_parent.<locals>.<genexpr>0   s     3Q3r    r)   r*   s    r   iter_parentzCriterion.iter_parent/   s    3$"2"233r   N)r   zIterable[CT]r   z*Collection[RequirementInformation[RT, CT]]r   zCollection[CT]returnNone)r/   str)r/   zIterator[RT])r/   zIterator[CT | None])__name__
__module____qualname____doc__r   r#   r+   r.   r   r   r   r   r      sB    &3 3 @3 *	3
 
3,94r   r   N)
__future__r   typingr   r   r   r   structsr	   r
   r   r   r   r   r   <module>r9      s(    " : : 4 4(4B (4r   