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__/isinstanceof.cpython-310.pyc
o

(]^��@svddlmZddlmZddlmZddlmZddlm	Z	dZ
dZdZGd	d
�d
ee
�Zdede	e
fd
d�ZdS)�)�Type)�BaseMatcher)�Description)�is_matchable_type)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc@sBeZdZdeddfdd�Zdedefdd�Zd	eddfd
d�Z	dS)�IsInstanceOf�
expected_type�returnNcCst|�std��||_dS)NzIsInstanceOf requires type)r�	TypeErrorr)�selfr�r�A/usr/lib/python3/dist-packages/hamcrest/core/core/isinstanceof.py�__init__s
zIsInstanceOf.__init__�itemcCst||j�S)N)�
isinstancer)rrrrr
�_matchesszIsInstanceOf._matches�descriptioncCs|�d��|jj�dS)Nzan instance of )�append_textr�__name__)rrrrr
�describe_toszIsInstanceOf.describe_to)
r�
__module__�__qualname__rr�object�boolrrrrrrr
r
sr�atyper	cCst|�S)aHMatches if object is an instance of, or inherits from, a given type.

    :param atype: The type to compare against as the expected type.

    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)rrrr
�instance_ofs
rN)�typingr�hamcrest.core.base_matcherr�hamcrest.core.descriptionr�"hamcrest.core.helpers.wrap_matcherr�hamcrest.core.matcherr�
__author__�
__copyright__�__license__rrrrrrr
�<module>s