o
    þ§Ýj  ã                   @  s²   U d Z ddlmZ ddlZddlmZ G dd„ deƒZejZde	d< ej
Z
de	d	< ejZde	d
< G dd„ dejƒZee
ed�Zde	d< eeed�Zde	d< ee
e
d�Zde	d< dS )z1Provide :class:`OnDup` and related functionality.é    )ÚannotationsN)ÚEnumc                   @  s&   e Zd ZdZdZdZdZd
dd„Zd	S )ÚOnDupActionz8An action to take to prevent duplication from occurring.ÚRAISEÚDROP_OLDÚDROP_NEWÚreturnÚstrc                 C  s   | j j› d| j› �S )NÚ.)Ú	__class__Ú__name__Úname)Úself© r   úF/var/www/html/chatgpt/venv/lib/python3.10/site-packages/bidict/_dup.pyÚ__repr__   s   zOnDupAction.__repr__N)r   r	   )r   Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r      s    r   zt.Final[OnDupAction]r   r   r   c                   @  s*   e Zd ZU dZeZded< eZded< dS )ÚOnDupa(  A combination of :class:`~bidict.OnDupAction`\s specifying how to handle various types of duplication.

    The :attr:`~OnDup.key` field specifies what action to take when a duplicate key is encountered.

    The :attr:`~OnDup.val` field specifies what action to take when a duplicate value is encountered.

    In the case of both key and value duplication across two different items,
    only :attr:`~OnDup.val` is used.

    *See also* :ref:`basic-usage:Values Must Be Unique`
    (https://bidict.rtfd.io/basic-usage.html#values-must-be-unique)
    r   ÚkeyÚvalN)	r   r   r   r   r   r   Ú__annotations__r   r   r   r   r   r   r   #   s   
 r   )r   r   zt.Final[OnDup]ÚON_DUP_DEFAULTÚON_DUP_RAISEÚON_DUP_DROP_OLD)r   Ú
__future__r   ÚtypingÚtÚenumr   r   r   r   r   r   Ú
NamedTupler   r   r   r   r   r   r   r   Ú<module>   s   