� L�gd ����dZddlmZddlZddlmZddlmZddlm Z Gd�d ej ee f��Z Gd �d e ee fej ee f��Z dS) z>Provide the :class:`BidirectionalMapping` abstract base class.�)� annotationsN)�abstractmethod�)�KT)�VTc�F�eZdZdZdZeed d�����Zd d�ZdS) �BidirectionalMappingaEAbstract base class for bidirectional mapping types. Extends :class:`collections.abc.Mapping` primarily by adding the (abstract) :attr:`inverse` property, which implementers of :class:`BidirectionalMapping` should override to return a reference to the inverse :class:`BidirectionalMapping` instance. ��return�BidirectionalMapping[VT, KT]c��t�)z�The inverse of this bidirectional mapping instance. *See also* :attr:`bidict.BidictBase.inverse`, :attr:`bidict.BidictBase.inv` :raises NotImplementedError: Meant to be overridden in subclasses. )�NotImplementedError��selfs �[/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/bidict/_abc.py�inversezBidirectionalMapping.inverse&s ��"�!��t.Iterator[tuple[VT, KT]]c�N�t|j�����S)aGet an iterator over the items in :attr:`inverse`. This is functionally equivalent to iterating over the items in the forward mapping and inverting each one on the fly, but this provides a more efficient implementation: Assuming the already-inverted items are stored in :attr:`inverse`, just return an iterator over them directly. Providing this default implementation enables external functions, particularly :func:`~bidict.inverted`, to use this optimized implementation when available, instead of having to invert on the fly. *See also* :func:`bidict.inverted` )�iterr�itemsrs r� __inverted__z!BidirectionalMapping.__inverted__5s ���D�L�&�&�(�(�)�)�)rN)r r )r r) �__name__� __module__� __qualname__�__doc__� __slots__�propertyrrrr rrr r sa���������I� �� "� "� "��^��X� "�*�*�*�*�*�*rr c��eZdZdZdZdS)�MutableBidirectionalMappingz<Abstract base class for mutable bidirectional mapping types.r N)rrrrrr rrr r Fs������F�F��I�I�Irr )r� __future__r�typing�t�abcr�_typingrr�Mappingr �MutableMappingr r rr�<module>r(s���E�D�"�"�"�"�"�"�����������������������)*�)*�)*�)*�)*�1�9�R��V�,�)*�)*�)*�X�����"6�r�2�v�">��@P�QS�UW�QW�@X�����r
Memory