
    6h                     `    S SK r S SKrSSKJr  SSSSSS	.r       SS
 jrS rS rS rS r	g)    N   )_make_nez==<z<=>z>=)eqltlegtgec                 4  ^
 S/[        5       / [        S.m
SnSnU b  Sn[        SU 5      T
S'   [        5       T
S'   Ub  US	-  n[        S
U5      T
S'   Ub  US	-  n[        SU5      T
S'   Ub  US	-  n[        SU5      T
S'   Ub  US	-  n[        SU5      T
S'   [        R
                  " U[        40 U
4S j5      n	U(       a  U	R                  R                  [        5        SUs=:  a  S:  a,  O  U	$ U(       d  [        S5      e[        R                  " U	5      n	U	$ )aD  
Create a class that can be passed into `attr.ib`'s ``eq``, ``order``, and
``cmp`` arguments to customize field comparison.

The resulting class will have a full set of ordering methods if
at least one of ``{lt, le, gt, ge}`` and ``eq``  are provided.

:param Optional[callable] eq: `callable` used to evaluate equality
    of two objects.
:param Optional[callable] lt: `callable` used to evaluate whether
    one object is less than another object.
:param Optional[callable] le: `callable` used to evaluate whether
    one object is less than or equal to another object.
:param Optional[callable] gt: `callable` used to evaluate whether
    one object is greater than another object.
:param Optional[callable] ge: `callable` used to evaluate whether
    one object is greater than or equal to another object.

:param bool require_same_type: When `True`, equality and ordering methods
    will return `NotImplemented` if objects are not of the same type.

:param Optional[str] class_name: Name of class. Defaults to 'Comparable'.

See `comparison` for more details.

.. versionadded:: 21.1.0
value)	__slots____init___requirements_is_comparable_tor   FTr   __eq____ne__r   r   __lt__r	   __le__r
   __gt__r   __ge__c                 &   > U R                  T5      $ N)update)nsbodys    @/usr/lib/python3/dist-packages/mercurial/thirdparty/attr/_cmp.py<lambda>cmp_using.<locals>.<lambda>S   s    biio       zDeq must be define is order to complete ordering from lt, le, gt, ge.)
_make_initr   _make_operatorr   types	new_classobjectr   append_check_same_type
ValueError	functoolstotal_ordering)r   r   r	   r
   r   require_same_type
class_namenum_order_functionshas_eq_functiontype_r   s             @r   	cmp_usingr1      sJ   L YL.	D O	~'b1X!X	~q 'b1X	~q 'b1X	~q 'b1X	~q 'b1XOOVIr#=E
 ""#34 	"" L  "  ((/Lr    c                      S n U $ )z
Create __init__ method.
c                     Xl         g)z!
Initialize object with *value*.
N)r   )selfr   s     r   r   _make_init.<locals>.__init__m   s	     
r     )r   s    r   r"   r"   h   s    
 Or    c                 R   ^ U4S jnSU < S3Ul         S[        U    < S3Ul        U$ )z
Create operator method.
c                    > U R                  U5      (       d  [        $ T" U R                  UR                  5      nU[        L a  [        $ U$ r   )r   NotImplementedr   )r4   otherresultfuncs      r   method_make_operator.<locals>.method{   sA    %%e,,!!djj%++.^#!!r    __z	Return a z b.  Computed by attrs.)__name___operation_names__doc__)namer<   r=   s    ` r   r#   r#   v   s,    
 #'(FOFN Mr    c                 H    U R                    H  nU" X5      (       a  M    g   g)z0
Check whether `other` is comparable to `self`.
FT)r   )r4   r:   r<   s      r   r   r      s'     ""D   # r    c                 Z    UR                   R                  U R                   R                  L $ )zJ
Return True if *self* and *other* are of the same type, False otherwise.
)r   	__class__)r4   r:   s     r   r(   r(      s#     ;;  DJJ$8$888r    )NNNNNT
Comparable)
r*   r$   _maker   rA   r1   r"   r#   r   r(   r6   r    r   <module>rI      sU       cSM  Xv.9r    