a
    P^N`4  ã                   @   sj   d dl mZmZ d dlmZ d dlmZ d dlmZ dZ	dZ
dZG dd	„ d	ee ƒZee d
œdd„ZdS )é    )ÚOptionalÚSized)ÚBaseMatcher)ÚDescription)ÚMatcherz
Chris RosezCopyright 2012 hamcrest.orgzBSD, see License.txtc                   @   s4   e Zd Zdeee edœdd„Zeddœdd„ZdS )	ÚIsEmptyN)ÚitemÚmismatch_descriptionÚreturnc                 C   sR   z,t |ƒdkrW dS |r*| dt |ƒ ¡ W n  tyL   |rH| d¡ Y n0 dS )Nr   Tzhas %d item(s)zdoes not support lengthF)ÚlenÚappend_textÚ	TypeError)Úselfr   r	   © r   úClib/python3.9/site-packages/hamcrest/library/collection/is_empty.pyÚmatches   s    zIsEmpty.matches)Údescriptionr
   c                 C   s   |  d¡ d S )Nzan empty collection)r   )r   r   r   r   r   Údescribe_to   s    zIsEmpty.describe_to)N)	Ú__name__Ú
__module__Ú__qualname__r   r   r   Úboolr   r   r   r   r   r   r      s   r   )r
   c                   C   s   t ƒ S )zy
    This matcher matches any collection-like object that responds to the
    __len__ method, and has a length of 0.
    )r   r   r   r   r   Úempty   s    r   N)Útypingr   r   Zhamcrest.core.base_matcherr   Zhamcrest.core.descriptionr   Zhamcrest.core.matcherr   Ú
__author__Z__copyright__Z__license__r   r   r   r   r   r   Ú<module>   s   