
    e4                     r    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	ee         Zd
ee   fdZy)    )OptionalSized)BaseMatcher)Description)Matcherz
Chris RosezCopyright 2012 hamcrest.orgzBSD, see License.txtc                   8    e Zd Zddedee   defdZdeddfdZy)	IsEmptyNitemmismatch_descriptionreturnc                     	 t        |      dk(  ry|r|j                  dt        |      z         y# t        $ r |r|j                  d       Y yw xY w)Nr   Tzhas %d item(s)zdoes not support lengthF)lenappend_text	TypeError)selfr
   r   s      F/usr/lib/python3/dist-packages/hamcrest/library/collection/is_empty.pymatcheszIsEmpty.matches   s_    		L4yA~#$001ACI1MN 	  	L#$001JK		Ls   1 1 AAdescriptionc                 &    |j                  d       y )Nzan empty collection)r   )r   r   s     r   describe_tozIsEmpty.describe_to   s     56    )N)	__name__
__module____qualname__r   r   r   boolr   r    r   r   r	   r	      s5    E +9N Z^ 7{ 7t 7r   r	   r   c                      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   emptyr      s    
 9r   N)typingr   r   hamcrest.core.base_matcherr   hamcrest.core.descriptionr   hamcrest.core.matcherr   
__author____copyright____license__r	   r   r   r   r   <module>r&      sA    " 2 1 )
-$7k%  7&wu~ r   