+
                                 ^ RI Ht ^ RIHt ^RIHtHtHt ^RIH	t	 ^RI
HtHtHt ^RIHt ^RIHt ^RIHt ^R	IHt ]! R
R
R7       ! R R]4      4       t ! R R]4      t ! R R]],          4      tR# )    )defaultdict)	dataclass)MLSRuleMLSRuletypeRange)DiffResultDescriptor)
DifferenceDifferenceResultWrapper)RangeWrapper)class_wrapper_factory)type_or_attr_wrapper_factory)RuleListT)frozenorderc                   0   a  ] tR t^t o RtV 3R ltRtV tR# )ModifiedMLSRulez+Difference details for a modified MLS rule.c                >   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )   ruleadded_defaultremoved_default)r   r   )format__classdict__s   "</usr/lib64/python3.14/site-packages/setools/diff/mlsrules.py__annotate__ModifiedMLSRule.__annotate__   s+     
 M          N)__name__
__module____qualname____firstlineno____doc____annotate_func____static_attributes____classdictcell__r   s   @r   r   r      s      6  r   r   c                      a  ] tR t^t o RtV 3R lR lt]],          ! ]4      t]],          ! ]4      t	]]
,          ! ]4      tRtRtV 3R lR ltV 3R lR ltV 3R	 ltR
tV tR# )MLSRulesDifferencez;Determine the difference in MLS rules between two policies.c                   < V ^8  d   QhRR/# r   returnNr   )r   r   s   "r   r   MLSRulesDifference.__annotate__!   s     3 3 3r   c                6   V P                   P                  RV P                   RV P                   24       V P                  e   V P
                  f   V P                  4        V P                  f   Q R4       hV P
                  f   Q R4       hV P                  V P                  V P                  \        P                  ,          \        4      V P                  V P
                  \        P                  ,          \        4      4      w  rp\        \        ,          ! 4       pV Fd  w  rV\        VP                  4      \        VP                  4      8w  g   K4  VP!                  \        VVP                  VP                  4      4       Kf  	  Wn        W n        W@n        R# )zGGenerate the difference in range_transition rules between the policies.z-Generating range_transition differences from z to Nz+Left MLS rules did not load, this is a bug.z,Right MLS rules did not load, this is a bug.)loginfoleft_policyright_policy_left_mls_rules_right_mls_rules_create_mls_rule_lists	_set_diff_expand_generatorr   range_transitionMLSRuleWrapperlistr   r   defaultappendadded_range_transitionsremoved_range_transitionsmodified_range_transitions)selfaddedremovedmatchedmodified	left_rule
right_rules   &      r   diff_range_transitions)MLSRulesDifference.diff_range_transitions!   sb    	;D<L<L;M N##$&	' '4+@+@+H'')##/^1^^/$$0`2``0"&..""4#7#78T8T#U#13""4#8#89U9U#V#13#4 (*%,!I I--.,z?Q?Q2RR	0:0B0B090A0A!C D	 &- (-$)0&*2'r   Nc                   < V ^8  d   QhRR/# r,   r   )r   r   s   "r   r   r.   M   s     = = =r   c                `   \        \        4      V n        V P                  P	                  RV P
                   24       V P
                  P                  4        F/  pV P                  VP                  ,          P                  V4       K1  	  \        \        4      V n	        V P                  P	                  RV P                   24       V P                  P                  4        F/  pV P                  VP                  ,          P                  V4       K1  	  V P                  P	                  R4       R# )z$Create rule lists for both policies.zBuilding MLS rule lists from z"Completed building MLS rule lists.N)r   r;   r4   r0   debugr2   mlsrulesruletyper=   r5   r3   rA   r   s   & r   r6   )MLSRulesDifference._create_mls_rule_listsM   s      +406t7G7G6HIJ$$--/D  /66t< 0 !,D 16t7H7H6IJK%%..0D!!$--077= 1 	;<r   c                   < V ^8  d   QhRR/# r,   r   )r   r   s   "r   r   r.   ]   s     	% 	%T 	%r   c                d    V P                   P                  R4       V =V =V =RV n        RV n        R# )z%Reset diff results on policy changes.zResetting MLS rule differencesN)r0   rL   r>   r?   r@   r4   r5   rA   s   &r   _reset_diffMLSRulesDifference._reset_diff]   s7    78(*+  $ $r   c                ^   < V ^8  d   Qh/ S[ S[S[3,          ;R&   S[ S[S[3,          ;R&   # )r   r4   r5   )r   r   r   )r   r   s   "r   r   r.      s7     T k723:U V {G34;W r   )r4   r5   r>   r@   r?   )r    r!   r"   r#   r$   rH   r   r   r>   r?   r   r@   r4   r5   r6   rT   r%   r&   r'   r(   s   @r   r*   r*      sq     E3 3B 37;<RS 4W =>T U!5o!FG]!^ 7;O7;
= = 	% 	%A  r   r*   c                   L   a  ] tR t^it 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 MLS rules to allow set operations.c                $   < V ^8  d   QhRS[ RR/# )r   r   r-   N)r   )r   r   s   "r   r   MLSRuleWrapper.__annotate__o   s      W  r   c                    Wn         \        VP                  4      V n        \        VP                  4      V n        \	        VP
                  4      V n        \        V4      V n        R # N)originr   sourcetargetr   tclasshashkeyrO   s   &&r   __init__MLSRuleWrapper.__init__o   sB    24;;?24;;?+DKK8:r   c                    V P                   # r[   ra   rS   s   &r   __hash__MLSRuleWrapper.__hash__v   s    xxr   c                4    V P                   VP                   8  # r[   re   rA   others   &&r   __lt__MLSRuleWrapper.__lt__y   s    xx%))##r   c                    V P                   VP                   8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r[   )r]   r^   r_   ri   s   &&r   __eq__MLSRuleWrapper.__eq__|   sM     {{ell* ( (KK5<<'( (KK5<<'	(r   )ra   r\   r]   r^   r_   N)rN   r]   r^   r_   )r    r!   r"   r#   r$   	__slots__rb   rf   rk   rn   r&   r'   r(   s   @r   r:   r:   i   s+     1:I $( (r   r:   N)collectionsr   dataclassesr   	policyrepr   r   r   descriptorsr   
differencer	   r
   r   mlsr   objclassr   typesr   typingr   r   r*   r:   r   r   r   <module>rz      sk    $ ! 3 3 - = =  + /  $d#&  $I% I%X(WW% (r   