� ��^i� ��L�ddlmZmZmZddlmZddlmZGd�d��ZdS)�)� FrozenSet�Optional�Set)�canonicalize_name)� CommandErrorc ���eZdZdZddgZ ddeeedeeeddfd�Zde de fd�Z defd �Z e d ed eedeeddfd ���Zd edeefd�Zdd�ZdS)� FormatControlzBHelper for managing formats from which a package can be installed.� no_binary� only_binaryN�returnc�b�|�t��}|�t��}||_||_dS�N)�setr r )�selfr r s ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/models/format_control.py�__init__zFormatControl.__init__ s7�� � ����I� � ��%�%�K�"���&������otherc����t��j��stS�j�jkrdSt ��fd��jD����S)NFc3�\�K�|]&}t�|��t�|��kV��'dSr)�getattr)�.0�krrs ��r� z'FormatControl.__eq__..!s<�����Q�Q�Q�7�4��#�#�w�u�a�'8�'8�8�Q�Q�Q�Q�Q�Qr)� isinstance� __class__�NotImplemented� __slots__�all)rrs``r�__eq__zFormatControl.__eq__sZ�����%���0�0� "�!� !� �>�U�_� ,� ,��5��Q�Q�Q�Q�Q�$�.�Q�Q�Q�Q�Q�Qrc�X�d�|jj|j|j��S)Nz {}({}, {}))�formatr�__name__r r �rs r�__repr__zFormatControl.__repr__#s+���"�"� �N� #�T�^�T�5E� � � r�value�targetc���|�d��rtd���|�d��}d|vrb|���|���|�d��|d|�d��dz�=d|vrdSd|v�b|D]V}|dkr|����t |��}|�|��|�|���WdS)N�-z7--no-binary / --only-binary option requires 1 argument.�,�:all:�z:none:)� startswithr�split�clear�add�indexr�discard)r&r'r�new�names r�handle_mutual_excludesz$FormatControl.handle_mutual_excludes(s�� � � �C� � � ��I��� ��k�k�#������n�n� �K�K�M�M�M� �L�L�N�N�N� �J�J�w� � � ��,�c�i�i��(�(�1�,�,�-��s�"�"�����n�n�� � �D��x���� � �����$�T�*�*�D� �M�M�$� � � � �J�J�t� � � � �  � r�canonical_namec��ddh}||jvr|�d��n\||jvr|�d��n=d|jvr|�d��nd|jvr|�d��t|��S)N�binary�sourcer+)r r2r � frozenset)rr6�results r�get_allowed_formatsz!FormatControl.get_allowed_formats?s����H�%�� �T�-� -� -� �N�N�8� $� $� $� $� �t�~� -� -� �N�N�8� $� $� $� $� ��(� (� (� �N�N�8� $� $� $� $� ��� &� &� �N�N�8� $� $� $��� � � rc�H�|�d|j|j��dS)Nr+)r5r r r$s r�disallow_binarieszFormatControl.disallow_binariesKs2�� �#�#� � �N� � � � � � � r)NN)r N)r#� __module__� __qualname__�__doc__rrr�strr�object�boolr r%� staticmethodr5rr<r>�rrr r s5������L�L��m�,�I�)-�*.� '� '��C��H�%� '��c�#�h�'� '� � '� '� '� '�R�F�R�t�R�R�R�R� �#� � � � � ��c��3�s�8��C��H��QU�����\��, !�#� !�)�C�.� !� !� !� !� � � � � � rr N) �typingrrr�pip._vendor.packaging.utilsr�pip._internal.exceptionsrr rFrr�rJs���+�+�+�+�+�+�+�+�+�+�9�9�9�9�9�9�1�1�1�1�1�1�H �H �H �H �H �H �H �H �H �H r