File: //proc/1233/root/usr/lib/python3/dist-packages/hamcrest/core/core/__pycache__/anyof.cpython-310.pyc
o
(]^4 � @ s� d dl mZmZ d dlmZ d dlmZ d dlmZ d dl m
Z
dZdZdZ
ed �ZG d
d� dee �Zdee
e ef d
e
e fdd�ZdS )� )�TypeVar�Union)�BaseMatcher)�Description��wrap_matcher)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txt�Tc @ sF e Zd Zdee ddfdd�Zdedefdd�Zd eddfd
d�Z dS )�AnyOf�matchers�returnNc G s
|| _ d S )N)r )�selfr � r �:/usr/lib/python3/dist-packages/hamcrest/core/core/anyof.py�__init__ s
zAnyOf.__init__�itemc C s | j D ]
}|�|�r
dS qdS )NTF)r �matches)r
r �matcherr r r �_matches s
�zAnyOf._matches�descriptionc C s |� ddd| j� d S )N�(z or �))�append_listr )r
r r r r �describe_to s zAnyOf.describe_to)
�__name__�
__module__�__qualname__r r r �boolr r r r r r r r
s r
�itemsr c G s t dd� | D �� S )a� Matches if any 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 ``True``.
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.
c S s g | ]}t |��qS r r )�.0r r r r �
<listcomp>* s zany_of.<locals>.<listcomp>)r
)r r r r �any_of s
r! N)�typingr r �hamcrest.core.base_matcherr �hamcrest.core.descriptionr �"hamcrest.core.helpers.wrap_matcherr �hamcrest.core.matcherr �
__author__�
__copyright__�__license__r r
r! r r r r �<module> s &