L i ddlmZddlZddlmZddlmZe Z GddZ e Z Gdd Z Gd d e e Zy) ) annotationsN)exc)WriteOnlyCollectionceZdZdZdZy) BasicEntityc N|jD]\}}t|||yN)itemssetattr)selfkwkeyvalues a/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/testing/entities.py__init__zBasicEntity.__init__s'((* &JC D#u % &c  t|tvrtj|Stj t| |j j ddjt|jjDcgc]$}|jds|dt||&c}dtjt|Scc}w#tjt|wxYw)N(z, _=))id _repr_stackobject__repr__add __class____name__joinsorted__dict__keys startswithgetattrremove)r rs rrzBasicEntity.__repr__s d8{ "??4( (4! )(( $*$--*<*<*>#?"~~c2$'c(:;    r$x (   r$x (sAC# )C 6 C#C## DN)r __module__ __qualname__rrrrrrs &)rrceZdZdZdZy)ComparableMixinc&|j| Sr )__eq__)r others r__ne__zComparableMixin.__ne__/s;;u%%%rc||ury|j|jk(syt|tvrytjt| tj j j|j}||}|}n ||}|}n|}|}t|jD] }|jdrt||}t|t r3 t||}t+|drt|t,st+|drDt+|ds8t|t|k7stj)t|yt/|t/|k7stj)t|y|||k7stj)t|y tj)t|y#tj jj$rd}YwxYw#t"t$j&f$r"Ytj)t|ywxYw#tj)t|wxYw)z'Deep, sparse compare. Deeply compare two entities, following the non-None attributes of the non-persisted object, if possible. TFNr__iter__ __getitem__r#)rr_recursion_stackrsaorm attributesinstance_staterrNO_STATElistr"r$r% isinstancerAttributeErrorsa_excUnboundExecutionErrorr&hasattrstrset)r r.self_keyabattrrbattrs rr-zComparableMixin.__eq__2s D=5??2 d8' 'RX&. . 66,,;;DAEE}%QZZ( %??3'4(e%89!#At,E5*-j6Lum4Wv> ;$u+5#(  # #BtH -u:U3#(  # #BtH - (Ue^$  # #BtH -; %6  # #BtH -U66::&&  2'(D(DE!  # #BtH -#!"  # #BtH -sz3GAI H ,A I8II0IIII9I)HIHI I#III I(N)rr'r(r/r-r)rrr+r+.s &>.rr+ceZdZdZy)ComparableEntityc,t|jSr )hashr)r s r__hash__zComparableEntity.__hash__tsDNN##rN)rr'r(rJr)rrrGrGss$rrG) __future__r sqlalchemyr4rr< orm.writeonlyrr@rrr3r+rGr)rrrOsI#/e ))05B.B.J$ $r