L i^ddlZddlZddlmZdddddd Z dd Zd Zd Zd ZdZ y)N)__ne__z==z>=)eqltlegtgec 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| jjtd|cxkrdkr(n| S|s d} t| tj| } | 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. Args: eq (typing.Callable | None): Callable used to evaluate equality of two objects. lt (typing.Callable | None): Callable used to evaluate whether one object is less than another object. le (typing.Callable | None): Callable used to evaluate whether one object is less than or equal to another object. gt (typing.Callable | None): Callable used to evaluate whether one object is greater than another object. ge (typing.Callable | None): Callable used to evaluate whether one object is greater than or equal to another object. require_same_type (bool): When `True`, equality and ordering methods will return `NotImplemented` if objects are not of the same type. class_name (str | None): Name of class. Defaults to "Comparable". See `comparison` for more details. .. versionadded:: 21.1.0 value) __slots____init__ _requirements_is_comparable_torFTr__eq__rrr__lt__r __le__r __gt__r __ge__c&|jSN)update)nsbodys O/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/attr/_cmp.pyzcmp_using..]sbiiozDeq 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 r require_same_type class_namenum_order_functionshas_eq_functiontype_msgrs @r cmp_usingr0 sD`YL.  DO ~'b1XX ~q 'b1X ~q 'b1X ~q 'b1X ~q 'b1X OOVIr#= E  ""#34 "" LYCS/ !((/ Lrc d}|S)z! Create __init__ method. c||_y)z1 Initialize object with *value*. N)r )selfr s rrz_make_init..__init__us  r)rs rr r ps  OrcLfd}d|d|_dt|d|_|S)z! Create operator method. c|j|stS|j|j}|turtS|Sr)rNotImplementedr )r3otherresultfuncs rmethodz_make_operator..methods>%%e,! !djj%++. ^ #! ! r__z Return a z b. Computed by attrs.)__name___operation_names__doc__)namer:r;s ` rr!r!~s; 4&mFO $T*++BC N MrcDtfdjDS)z8 Check whether `other` is comparable to `self`. c30K|] }|ywrr4).0r:r8r3s r z$_is_comparable_to..s@TtD% @s)allrr3r8s``rrrs @T-?-?@ @@rcZ|jj|jjuS)zR Return True if *self* and *other* are of the same type, False otherwise. )r __class__rFs rr&r&s# ;; DJJ$8$8 88r)NNNNNT Comparable) r(r"_makerr>r0r r!rr&r4rrrKsV cSM     `F .A9r