+
    D#jf                    F    ^ RI Ht ^ RIt^ RIHt ^ RIHt  ! R R4      tR# )    )annotationsN)Iterable)Pathc                  V    ] tR t^tRtR R ltR R ltR R ltR R	 ltR
 R lt	Rt
R# ) FactoryDecisionNotificationStoreu   Edge-triggered seen-set: one desktop notification per decision id, ever.

Persisted so tray restarts cannot re-notify. Pruning to the currently
pending set is safe because a decision id never returns to pending —
re-asks mint new ids.
c                    V ^8  d   QhRRRR/# )   pathr   returnNone )formats   "t/home/user/overdeck-private-tests/subrouter-s5-systray-latest/modules/systray/factory_decision_notification_store.py__annotate__-FactoryDecisionNotificationStore.__annotate__   s      T d     c                	    Wn         R # N_path)selfr
   s   &&r   __init__)FactoryDecisionNotificationStore.__init__   s    
r   c                    V ^8  d   QhRRRR/# )r	   decision_idstrr   boolr   )r   s   "r   r   r      s      3 4 r   c                z    V P                  4       pW9   d   R# VP                  V4       V P                  V4       R# )z2True only the first time this decision id is seen.FT)_readadd_write)r   r   states   && r   record_notified0FactoryDecisionNotificationStore.record_notified   s1    

		+Er   c                    V ^8  d   QhRRRR/# )r	   keep_idszIterable[str]r   r   r   )r   s   "r   r   r      s        m    r   c                	~    \        V4      pV P                  4       pW2,          pWC8w  d   V P                  V4       R # R # r   )setr   r!   )r   r&   keepr"   pruneds   &&   r   prune&FactoryDecisionNotificationStore.prune   s3    8}

?KK r   c                   V ^8  d   QhRR/# )r	   r   set[str]r   )r   s   "r   r   r   #   s     	. 	.x 	.r   c                	   V P                   P                  4       '       g   \        4       #  \        P                  ! V P                   P                  R R7      4      p\        T\        4      '       g   \        4       # T Uu0 uF  p\        T4      kK  	  up#   \        \        P                  3 d    \        4       u # i ; iu upi )utf-8encoding)r   existsr(   jsonloads	read_textOSErrorJSONDecodeError
isinstancelistr   )r   dataentrys   &  r   r   &FactoryDecisionNotificationStore._read#   s    zz  ""5L	::djj22G2DED $%%5L(,-uE
--	 --. 	5L	 .s   0B  C%B?>B?c                    V ^8  d   QhRRRR/# )r	   r"   r.   r   r   r   )r   s   "r   r   r   .   s     & &H & &r   c                	\   V P                   P                  P                  R R R7       V P                   P                  V P                   P                   R24      pVP                  \        P                  ! \        V4      4      R,           RR7       VP                  V P                   4       R# )T)parentsexist_okz.tmp
r0   r1   N)
r   parentmkdirwith_suffixsuffix
write_textr4   dumpssortedreplace)r   r"   	temporarys   && r   r!   'FactoryDecisionNotificationStore._write.   s|    

t<JJ**djj.?.?-@+EF	TZZu6=P$**%r   r   N)__name__
__module____qualname____firstlineno____doc__r   r#   r+   r   r!   __static_attributes__r   r   r   r   r      s%     	.& &r   r   )
__future__r   r4   collections.abcr   pathlibr   r   r   r   r   <module>rV      s    "  $ *& *&r   