Mini Shell
3
C��ez � @ sv d dl mZmZ d dlmZ d dlmZ d dlmZ ee �Z
edddg�Zdd gZG d
d � d e
�ZG dd� de
�ZdS )
� )�OrderedDict�
namedtuple)�PayloadRequirementType)�PayloadRequirementsMissingApply)�get_module_logger�PayloadRequirementReason�reason�strong�PayloadRequirements�PayloadRequirementc @ sX e Zd ZdZddd�Zedd� �Zedd� �Zed d
� �Zddd
�Z dd� Z
dd� ZdS )r a� An object to store a payload requirement with info about its reasons.
For each requirement multiple reasons together with their strength
can be stored in this object using the add_reason method.
A reason should be just a string with description (ie for tracking purposes).
Strength is a boolean flag that can be used to indicate whether missing the
requirement should be considered fatal. Strength of the requirement is
given by strength of all its reasons.
Nc C s || _ |pg | _d S )N)�_id�_reasons)�selfZreq_id�reasons� r �#/usr/lib64/python3.6/requirement.py�__init__+ s zPayloadRequirement.__init__c C s | j S )z1Identifier of the requirement (eg a package name))r )r r r r �id/ s zPayloadRequirement.idc C s dd� | j D �S )z#List of reasons for the requirementc S s g | ]\}}|�qS r r )�.0r r r r r �
<listcomp>7 s z.PayloadRequirement.reasons.<locals>.<listcomp>)r
)r r r r r 4 s zPayloadRequirement.reasonsc C s t dd� | jD ��S )z?Strength of the requirement (ie should it be considered fatal?)c s s | ]\}}|V qd S )Nr )r r r r r r � <genexpr><