Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/attr/__pycache__/_cmp.cpython-311.pyc



]j`ddlZddlZddlmZdddddd	Z							ddZd
ZdZdZdZ	dS)N)_make_nez==<z<=>z>=)eqltlegtgeT
ComparablecN
dgtgtd
d}d}|&d}td|
d<t
d	<||d
z
}td|
d<||d
z
}td
|
d<||d
z
}td|
d<||d
z
}td|
d<t	j|tfi
fd}	|r|	jtd|cxkrdkr(nn%|stdtj|	}	|	S)a
    Create a class that can be passed into `attrs.field`'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_torFNTr__eq____ne__rr__lt__r	__le__r
__gt__r__ge__c.|SN)update)nsbodys i/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/attr/_cmp.py<lambda>zcmp_using.<locals>.<lambda>SsbiioozDeq must be define is order to complete ordering from lt, le, gt, ge.)
_make_initr_make_operatorrtypes	new_classobjectrappend_check_same_type
ValueError	functoolstotal_ordering)rrr	r
rrequire_same_type
class_namenum_order_functionshas_eq_functiontype_rs          @r	cmp_usingr1
sLYLL.	DO	~'b11X!X	~q 'b11X	~q 'b11X	~q 'b11X	~q 'b11XOVIr#=#=#=#=

E
5
""#3444	"""""""""	"
(//Lr cd}|S)z!
    Create __init__ method.
    c||_dS)z1
        Initialize object with *value*.
        N)r)selfrs  rrz_make_init.<locals>.__init__ms


r )rs rr"r"hs
Or cTfd}d|d|_dt|d|_|S)z!
    Create operator method.
    c||stS|j|j}|turtS|Sr)rNotImplementedr)r4otherresultfuncs   rmethodz_make_operator.<locals>.method{sJ%%e,,	"!!dj%+..^##!!
r __z	Return a z b.  Computed by attrs.)__name___operation_names__doc__)namer;r<s ` rr#r#vsO
$4mmmFOC$T*CCCNMr c8|jD]}|||sdSdS)z8
    Check whether `other` is comparable to `self`.
    FT)r)r4r9r;s   rrrs;"tD%  	55	4r c2|jj|jjuS)zR
    Return True if *self* and *other* are of the same type, False otherwise.
    )r	__class__)r4r9s  rr(r(s; DJ$888r )NNNNNTr)
r*r$_makerr?r1r"r#rr(r5r r<module>rFscSMMXXXXv.99999r 
Back to Directory File Manager