| Server IP : 104.21.4.30 / Your IP : 104.23.243.33 Web Server : Apache System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64 User : simottodesign.com_2tntp341vs7 ( 10011) PHP Version : 8.3.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/hamcrest/core/core/__pycache__/ |
Upload File : |
U
�b�VH � @ sH d dl mZ d dlmZ dZdZdZd dlZG dd� de�Zd d
� Z dS )� )�BaseMatcher)�is_matchable_typezJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtNc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�IsInstanceOfc C s t |�std��|| _d S )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__ s zIsInstanceOf.__init__c C s t || j�S �N)�
isinstancer )r �itemr r r �_matches s zIsInstanceOf._matchesc C sP z| j j}W n. tk
r: dd�dd� | j D �� }Y nX |�d��|� d S )Nz one of %s�,c s s | ]}t |�V qd S r )�str)�.0�er r r � <genexpr> s z+IsInstanceOf.describe_to.<locals>.<genexpr>zan instance of )r �__name__�AttributeError�joinZappend_text)r ZdescriptionZtype_descriptionr r r �describe_to s
�zIsInstanceOf.describe_toN)r �
__module__�__qualname__r
r r r r r r r
s r c C s t | �S )ad Matches 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 )Zatyper r r �instance_of s r )
Zhamcrest.core.base_matcherr Z"hamcrest.core.helpers.wrap_matcherr �
__author__Z
__copyright__Z__license__�typesr r r r r r �<module> s