HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/hamcrest/core/core/__pycache__/allof.cpython-310.pyc
o

(]^	�@s�ddlmZmZmZddlmZddlmZddlm	Z	ddl
mZdZdZ
dZed	�ZGd
d�dee�Zdeeeefd
eefdd�ZdS)�)�Optional�TypeVar�Union)�BaseMatcher)�Description��wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt�Tc@sbeZdZdeefdd�Zddedeedefdd	�Z	dededdfd
d�Z
deddfd
d�ZdS)�AllOf�matcherscOs&||_|�dd�|_|�dd�|_dS)N�describe_matcher_in_mismatchT�describe_all_mismatchesF)r�popr
r)�selfr�kwargs�r�:/usr/lib/python3/dist-packages/hamcrest/core/core/allof.py�__init__s
�zAllOf.__init__N�item�mismatch_description�returncCs�d}t|j�D]5\}}|�|�s<|r#|jr|�|��d�|�||�d}|js,|S|t|j�dkr<|r<|�d�q|S)NF� T�� and )	�	enumerater�matchesr
�append_description_of�append_text�describe_mismatchr�len)rrr�found_mismatch�i�matcherrrrrs
�
�z
AllOf.matchescCs|�||�dS�N)r)rrrrrrr&szAllOf.describe_mismatch�descriptioncCs|�ddd|j�dS)N�(r�))�append_listr)rr%rrr�describe_to)szAllOf.describe_tor$)�__name__�
__module__�__qualname__r	r
rrr�boolrrr)rrrrrs
r�itemsrcGstdd�|D��S)a�Matches if all of the given matchers evaluate to ``True``.

    :param matcher1,...:  A comma-separated list of matchers.

    The matchers are evaluated from left to right using short-circuit
    evaluation, so evaluation stops as soon as a matcher returns ``False``.

    Any argument that is not a matcher is implicitly wrapped in an
    :py:func:`~hamcrest.core.core.isequal.equal_to` matcher to check for
    equality.

    cSsg|]}t|��qSrr)�.0rrrr�
<listcomp>:szall_of.<locals>.<listcomp>)r)r.rrr�all_of-s
r1N)�typingrrr�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�"hamcrest.core.helpers.wrap_matcherr�hamcrest.core.matcherr	�
__author__�
__copyright__�__license__r
rr1rrrr�<module>s&