+
    ,i
  c                   s    ^ RI Ht ^RIHtHt ^RIHt ^RIHt ^RI	H
t
HtHt ]! RRR7       ! R R	]4      4       t ! R
 R]
4      t ! R R]],          4      tR# )i    )	dataclass)ContextNodecon)ContextWrapper)DiffResultDescriptor)
DifferenceDifferenceResultWrapperT)ZfrozenZorderc                   s0   a  ] tR t^t o RtV 3R ltRtV tR# )ModifiedNodeconz+Difference details for a modified netifcon.c                s>   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )   ZruleZadded_contextZremoved_context)r   r   Zformat__classdict__   ";/usr/lib64/python3.14/site-packages/setools/diff/nodecon.py__annotate__ZModifiedNodecon.__annotate__   s+     
 M          N)__name__
__module____qualname____firstlineno____doc__Z__annotate_func____static_attributes____classdictcell__r      @r   r   r      s      6  r   r   c                   s   a  ] tR t^t o RtV 3R lR lt]],          ! ]4      t]],          ! ]4      t	]]
,          ! ]4      tV 3R lR ltRtV tR# )NodeconsDifferencez:Determine the difference in nodecons between two policies.c                   < V ^8  d   QhRR/# r	   returnNr   r
   r   r   r   NodeconsDifference.__annotate__   s     U Ut Ur   c                sJ   V P                   P                  RV P                   RV P                   24       V P	                  R V P                  P                  4        4       R V P                  P                  4        4       4      w  V n        V n        p\        \        ,          ! 4       V n
        V Fn  w  r#\        VP                  4      \        VP                  4      8w  g   K4  V P                  P                  \        VVP                  VP                  4      4       Kp  	  R# )z9Generate the difference in nodecons between the policies.z$Generating nodecon differences from z to c              3   8   "   T F  p\        V4      x  K  	  R # 5iNNodeconWrapperZ.0Zn   & r   	<genexpr>3NodeconsDifference.diff_nodecons.<locals>.<genexpr>$   s     D(C1^A(C   c              3   r   r    r!   r#   r$   r   r%   r&   %   s     E(D1^A(Dr'   N)logZinfoZleft_policyZright_policyZ	_set_diffZnodeconsadded_nodeconsremoved_nodeconsZlistr   modified_nodeconsr   contextZappend)selfZmatched_nodeconsZleft_nodeconZright_nodecons   &   r   diff_nodeconsZ NodeconsDifference.diff_nodecons   s     	243C3C2DDIZIZH[\	^ HL~~D(8(8(A(A(CDE(9(9(B(B(DEHGDT24D "&o!6!8+;'L l223~mF[F[7\\&&--ol>K>S>S>J>R>R/T U	 ,<r   c                r   r   r   r
   r   r   r   r   8   s     # #T #r   c                sH    V P                   P                  R4       V =V =V =R# )z%Reset diff results on policy changes.zResetting nodecon differencesN)r(   Zdebugr)   r*   r+   r-      &r   _reset_diffZNodeconsDifference._reset_diff8   s%    67!"r   )r)   r+   r*   N)r   r   r   r   r   r.   r   r   r)   r*   r   r+   r1   r   r   r   r   r   r   r      sO     DU U( *'2=AN+G4]C,_=mL
# #r   r   c                   sL   a  ] tR t^@t o RtR	tV 3R lR ltR tR tR t	Rt
V tR# )
r"   z*Wrap nodecon statements for diff purposes.c                s$   < V ^8  d   QhRS[ RR/# )r	   oconr   N)r   r
   r   r   r   ZNodeconWrapper.__annotate__F   s      W  r   c                sv    Wn         VP                  V n        VP                  V n        \        V4      V n        R # r    )origin
ip_versionnetworkZhashkey)r-   r2      &&r   __init__ZNodeconWrapper.__init__F   s(    //||:r   c                s    V P                   # r    )r6   r/   r0   r   __hash__ZNodeconWrapper.__hash__L   s    xxr   c                s4    V P                   VP                   8  # r    )r3   r-   Zotherr7   r   __lt__ZNodeconWrapper.__lt__O   s    {{U\\))r   c                sv    V P                   VP                   8H  ;'       d    V P                  VP                  8H  # r    r4   r5   r:   r7   r   __eq__ZNodeconWrapper.__eq__R   s3    %"2"22 * *LLEMM)	*r   )r4   r6   r5   r3   Nr<   )r   r   r   r   r   Z	__slots__r8   r9   r;   r=   r   r   r   r   r   r"   r"   @   s+     4)I ** *r   r"   N)Zdataclassesr    Z	policyrepr   r   r,   r   Zdescriptorsr   Z
differencer   r   r   r   r   r"   r   r   r   <module>r>      sZ    " ( # - = = $d#&  $$# $#N*WW% *r   