HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/hamcrest/core/core/__pycache__/isinstanceof.cpython-38.pyc
U

�b�VH�@sHddlmZddlmZdZdZdZddlZGdd�de�Zd	d
�Z	dS)�)�BaseMatcher)�is_matchable_typezJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtNc@s$eZdZdd�Zdd�Zdd�ZdS)�IsInstanceOfcCst|�std��||_dS)Nz:IsInstanceOf requires type or a tuple of classes and types)r�	TypeError�
expected_type)�selfr�r�A/usr/lib/python3/dist-packages/hamcrest/core/core/isinstanceof.py�__init__szIsInstanceOf.__init__cCst||j�S�N)�
isinstancer)r�itemrrr	�_matchesszIsInstanceOf._matchescCsPz|jj}Wn.tk
r:dd�dd�|jD��}YnX|�d��|�dS)Nz	one of %s�,css|]}t|�VqdSr)�str)�.0�errr	�	<genexpr>sz+IsInstanceOf.describe_to.<locals>.<genexpr>zan instance of )r�__name__�AttributeError�joinZappend_text)rZdescriptionZtype_descriptionrrr	�describe_tos 
�zIsInstanceOf.describe_toN)r�
__module__�__qualname__r
rrrrrr	r
srcCst|�S)adMatches if object is an instance of, or inherits from, a given type.

    :param atype: The type to compare against as the expected type or a tuple
        of types.

    This matcher checks whether the evaluated object is an instance of
    ``atype`` or an instance of any class that inherits from ``atype``.

    Example::

        instance_of(str)

    )r)Zatyperrr	�instance_ofsr)
Zhamcrest.core.base_matcherrZ"hamcrest.core.helpers.wrap_matcherr�
__author__Z
__copyright__Z__license__�typesrrrrrr	�<module>s