관리-도구
편집 파일: models.cpython-38.opt-1.pyc
U ��.e| � @ s d Z ddlZG dd� de�ZdS )zUtilities for defining models � Nc @ sX e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� ZdS )�KeyBasedCompareMixinz<Provides comparison capabilities that is based on a key c C s || _ || _d S �N)�_compare_key�_defining_class)�self�keyZdefining_class� r �>/usr/lib/python3.8/site-packages/pip/_internal/utils/models.py�__init__ s zKeyBasedCompareMixin.__init__c C s t | j�S r )�hashr )r r r r �__hash__ s zKeyBasedCompareMixin.__hash__c C s | � |tj�S r )�_compare�operator�__lt__�r �otherr r r r s zKeyBasedCompareMixin.__lt__c C s | � |tj�S r )r r �__le__r r r r r s zKeyBasedCompareMixin.__le__c C s | � |tj�S r )r r �__gt__r r r r r s zKeyBasedCompareMixin.__gt__c C s | � |tj�S r )r r �__ge__r r r r r s zKeyBasedCompareMixin.__ge__c C s | � |tj�S r )r r �__eq__r r r r r s zKeyBasedCompareMixin.__eq__c C s | � |tj�S r )r r �__ne__r r r r r # s zKeyBasedCompareMixin.__ne__c C s t || j�stS || j|j�S r )� isinstancer �NotImplementedr )r r �methodr r r r &