
    ~/j                        S SK Jr  S SKrS SKJr  S SKrS SKJr  SS jrSS jr	SS jr
SS jrSS	 jr\R                  rSS
 jrSS jrSS jrg)    )annotationsN)Mapping)	TypeGuardc                    [        U [        R                  R                  5      =(       a    [        U [        5      (       + $ N)
isinstancecollectionsabcSequencestrxs    X/root/lseg-credit/backend/venv/lib/python3.13/site-packages/_pytest/assertion/_guards.py
issequencer   	   s(    a112M:a;M7MM    c                "    [        U [        5      $ r   )r   r   r   s    r   istextr      s    ar   c                "    [        U [        5      $ r   )r   r   r   s    r   	ismappingr      s    a!!r   c                0    [        U [        [        -  5      $ r   )r   set	frozensetr   s    r   issetr      s    ay))r   c                N    [        U [        5      =(       a    [        U SS 5      S L$ )N_fields)r   tuplegetattrobjs    r   isnamedtupler       s"    c5!Ogc9d&C4&OOr   c                     [        U SS 5      S L$ )N__attrs_attrs__)r   r   s    r   isattrsr#       s    3)40<<r   c                Z     [        U 5        [        U 5      (       + $ ! [         a     gf = f)NF)iterr   	Exceptionr   s    r   
isiterabler'   $   s,    S	#; s    
**c                    [        U R                  S5      (       a_  [        U R                  R                  S5      (       a:  U R                  R                  R                  n[	        U 5      (       a  SU;   $ US:H  $ g)a|  Check if an instance of an object contains the default eq

First, we check if the object's __eq__ attribute has __code__,
if so, we check the equally of the method code filename (__code__.co_filename)
to the default one generated by the dataclass and attr module
for dataclasses the default co_filename is <string>, for attrs class, the __eq__ should contain "attrs eq generated"
__code__co_filenamezattrs generated z<string>T)hasattr__eq__r)   r*   r#   )r   code_filenames     r   has_default_eqr.   ,   sb     szz:&&73::3F3F+V+V

++773<<%66
**r   )r   objectreturnz+TypeGuard[collections.abc.Sequence[object]])r   r/   r0   zTypeGuard[str])r   r/   r0   z"TypeGuard[Mapping[object, object]])r   r/   r0   z*TypeGuard[set[object] | frozenset[object]])r   r/   r0   bool)r   r/   r0   z+TypeGuard[collections.abc.Iterable[object]])
__future__r   collections.abcr	   r   dataclassestypingr   r   r   r   r   r    is_dataclass	isdataclsr#   r'   r.    r   r   <module>r9      sK    "  #  N"*P $$	=r   