+
    ,i[
  c                   s   a  R t0 t ^ RIHt ^ RIHt ^RIHtHt ^RIH	t	 ^RI
HtHtHt ^RIHt ]! ]4      t] ^ k ]! RRR7       ! R	 R
]4      4       tR R lt ! R R]4      tR# )i    )defaultdict)	dataclass)SELinuxPolicyBoolean)DiffResultDescriptor)
DifferenceDifferenceResultSymbolWrapper)SymbolCacheT)ZfrozenZorderc                   s0   a  ] tR t^t o RtV 3R ltRtV tR# )ModifiedBooleanz*Difference details for a modified Boolean.c                s>   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )   booleanZadded_stateZremoved_state)r   Zboolformat__classdict__   "8/usr/lib64/python3.14/site-packages/setools/diff/bool.py__annotate__ZModifiedBoolean.__annotate__   s,     
           N)__name__
__module____qualname____firstlineno____doc__Z__annotate_func____static_attributes____classdictcell__r      @r   r	   r	      s      5  r   r	   c                sR    V ^8  d   QhR\         R\        R\        \        ,          /# )r
   policyr   return)r   r   r   r      "r   r   r      s&      M G g@V r   c                s     \         V ,          V,          #   \         d!    \        T4      pT\         T ,          T&   Tu # i ; i)zo
Wrap booleans from the specified policy.

This caches results to prevent duplicate wrapper
objects in memory.
)_bool_cacheZKeyErrorr   )r   r   bs   && r   boolean_wrapperr#      sD    6"7++ '"'(FG$s    (A A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# )BooleansDifferencezADetermine the difference in type attributes between two policies.c                   < V ^8  d   QhRR/# r
   r   Nr   r   r   r   r   BooleansDifference.__annotate__0   s     S St Sr   c                s&   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 F\  w  r#VP                  VP                  8w  g   K"  V P                  P                  \        VVP                  VP                  4      4       K^  	  R# )z@Generate the difference in type attributes between the policies.z$Generating Boolean differences from z to c              3   8   "   T F  p\        V4      x  K  	  R # 5iNr   Z.0r"      & r   	<genexpr>3BooleansDifference.diff_booleans.<locals>.<genexpr>8   s     D+Caq!!+C   c              3   r(   r)   r*   r+   r,   r   r-   r.   9   s     E+Daq!!+Dr/   N)logZinfoZleft_policyZright_policyZ	_set_diffZboolsadded_booleansremoved_booleansZlistr	   modified_booleansZstateZappend)selfZmatched_booleansZleft_booleanZright_booleans   &   r   diff_booleansZ BooleansDifference.diff_booleans0   s     	243C3C2DDIZIZH[\	^ NND4+;+;+A+A+CDE4+<+<+B+B+DEG 	ET24D
 "&o!6!8+;'L !!]%8%88&&--ol>K>Q>Q>J>P>P/R S	 ,<r   c                r%   r&   r   r   r   r   r   r'   L   s     # #T #r   c                sH    V P                   P                  R4       V =V =V =R# )z%Reset diff results on policy changes.zResetting Boolean differencesN)r0   Zdebugr1   r2   r3   )r4   s   &r   _reset_diffZBooleansDifference._reset_diffL   s%    67!"r   )r1   r3   r2   N)r   r   r   r   r   r5   r   r   r1   r2   r	   r3   r6   r   r   r   r   r   r$   r$   ,   sO     KS S* *'2=AN+G4]C,_=mL
# #r   r$   c                sV    V ^8  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r
   r!   )__conditional_annotations__r   r   r   r    r   r   r      s     # # 6 5[! 5 $r   N)r7   Zcollectionsr    Zdataclassesr   Z	policyrepr   r   Zdescriptorsr   Z
differencer   r   r   Ztypingr   Zdictr!   r	   r#   r$   r   )r7   r   r   <module>r8      sc    $ # ! . - C C  %0$5 5 $d#&  $%# %#r   