
    
3j	                         S SK r S SKJrJrJrJr  S SKJrJr  S SK	J
r
  \(       a  S SKJr   " S S\S9r " S	 S
5      r " S S5      rg)    N)AnyOptionalListTYPE_CHECKING)ABCMetaabstractmethod)5convert_item_or_items_into_compiled_regexes_else_none)DeepDiffc                   h    \ rS rSr\S\4S j5       r\SSS\4S j5       r\S\S\S\4S	 j5       r	S
r
g)BaseOperatorPlus
   returnc                     g)z
Given a level which includes t1 and t2 in the tree view, is this operator a good match to compare t1 and t2?
If yes, we will run the give_up_diffing to compare t1 and t2 for this level.
N selflevels     K/home/wildlama/miniconda3/lib/python3.13/site-packages/deepdiff/operator.pymatchBaseOperatorPlus.match   s     	    diff_instancer
   c                     g)z
Given a level which includes t1 and t2 in the tree view, and the "distance" between l1 and l2.
do we consider t1 and t2 to be equal or not. The distance is a number between zero to one and is calculated by DeepDiff to measure how similar objects are.
Nr   r   r   r   s      r   give_up_diffing BaseOperatorPlus.give_up_diffing   s    r   parentobjc                     g)z
You can use this function to normalize values for ignore_order=True

For example, you may want to turn all the words to be lowercase. Then you return obj.lower()
Nr   )r   r   r   s      r   normalize_value_for_hashing,BaseOperatorPlus.normalize_value_for_hashing   s     	r   r   N)__name__
__module____qualname____firstlineno__r   boolr   r   r   r    __static_attributes__r   r   r   r   r   
   sf    d   J 4   # C C  r   r   )	metaclassc                   ^    \ rS rSrS
S\\\      S\\\      4S jjrS\	4S jr
S\	4S jrS	rg)BaseOperator&   Nregex_pathstypesc                 N    U(       a  [        U5      U l        OS U l        X l        g N)r	   r,   r-   )r   r,   r-   s      r   __init__BaseOperator.__init__(   s     TU`aD#D
r   r   c                 f   U R                   (       aB  U R                    H2  n[        R                  " X!R                  5       5      S LnU(       d  M2    g   U R                  (       aM  U R                   H=  n[        UR                  U5      (       d  M   [        UR                  U5      (       d  M=    g   g)NTF)r,   researchpathr-   
isinstancet1t2)r   r   patternmatchedtype_s        r   r   BaseOperator.match/   s|    ++))GZZ\:$F7 , ::ehh..:ehh3N3N $ r   c                     [        S5      e)Nz#Please implement the diff function.)NotImplementedErrorr   s      r   r   BaseOperator.give_up_diffing;   s    !"GHHr   )r,   r-   )NN)r"   r#   r$   r%   r   r   strtyper0   r&   r   r   r'   r   r   r   r*   r*   &   sB    8DI#6 8DQUJCW 
d 
It Ir   r*   c                   0    \ rS rSrS\4S jrS\4S jrSrg)PrefixOrSuffixOperator?   r   c                     UR                   =(       aN    UR                  =(       a;    [        UR                   [        5      =(       a    [        UR                  [        5      $ r/   )r7   r8   r6   r@   r   s     r   r   PrefixOrSuffixOperator.matchA   s9    xx`EHH`EHHc)B`zRWRZRZ\_G``r   c                     UR                   nUR                  nUR                  U5      =(       d    UR                  U5      $ r/   )r7   r8   
startswith)r   r   r   r7   r8   s        r   r   &PrefixOrSuffixOperator.give_up_diffingD   s1    XXXX}}R 5BMM"$55r   r   N)r"   r#   r$   r%   r&   r   r   r'   r   r   r   rC   rC   ?   s    ad a6t 6r   rC   )r3   typingr   r   r   r   abcr   r   deepdiff.helperr	   deepdiffr
   r   r*   rC   r   r   r   <module>rN      s<    	 5 5 ' Q! 8I I26 6r   