a
    b                     @   s   G d d de ZdS )c                   @   sh   e Zd ZdZdddZedd Zdd	 Zd
d Zdd Z	dd Z
dd Zedd Zejdd ZdS )CommentNO      c                 C   s   || _ || _|| _|| _d S N)contentauthorheightwidth)selftextr   r   r    r   j/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/openpyxl/comments/comments.py__init__   s    zComment.__init__c                 C   s   | j S r   _parentr	   r   r   r   parent   s    zComment.parentc                 C   s   | j |j ko| j|jkS r   )r   r   )r	   otherr   r   r   __eq__   s    
zComment.__eq__c                 C   s   d | j| jS )NzComment: {0} by {1})formatr   r   r   r   r   r   __repr__   s    zComment.__repr__c                 C   s   |  | j| j| j| j}|S )z'Create a detached copy of this comment.)	__class__r   r   r   r   )r	   cloner   r   r   __copy__   s    zComment.__copy__c                 C   s@   |dur6| j dur6| j |kr6d}t||j|jj|| _ dS )z3
        Bind comment to a particular cell
        Nz_Comment already assigned to {0} in worksheet {1}. Cannot assign a comment to more than one cell)r   AttributeErrorr   Z
coordinater   title)r	   cellfmtr   r   r   bind$   s    zComment.bindc                 C   s
   d| _ dS )z.
        Unbind a comment from a cell
        Nr   r   r   r   r   unbind.   s    zComment.unbindc                 C   s   | j S )z>
        Any comment text stripped of all formatting.
        r   r   r   r   r   r
   5   s    zComment.textc                 C   s
   || _ d S r   r   )r	   valuer   r   r   r
   <   s    )r   r   )__name__
__module____qualname__r   r   propertyr   r   r   r   r   r   r
   setterr   r   r   r   r      s   



r   N)objectr   r   r   r   r   <module>       