Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/hamcrest/core/core/__pycache__/ |
Upload File : |
o (]^� � @ sv d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z dZ dZdZG d d � d ee �Zdede e fd d�ZdS )� )�Type)�BaseMatcher)�Description)�is_matchable_type)�MatcherzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtc @ sB e Zd Zdeddfdd�Zdedefdd�Zd eddfd d�Z dS )�IsInstanceOf� expected_type�returnNc C s t |�std��|| _d S )NzIsInstanceOf requires type)r � TypeErrorr )�selfr � r �A/usr/lib/python3/dist-packages/hamcrest/core/core/isinstanceof.py�__init__ s zIsInstanceOf.__init__�itemc C s t || j�S )N)� isinstancer )r r r r r �_matches s zIsInstanceOf._matches�descriptionc C s |� d�� | jj� d S )Nzan instance of )�append_textr �__name__)r r r r r �describe_to s zIsInstanceOf.describe_to) r � __module__�__qualname__r r �object�boolr r r r r r r r s r �atyper c C s t | �S )aH Matches 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 )r r r r �instance_of s r N)�typingr �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