HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/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