+
    i                     ~   ^ RI t ^ RIt^ RIHt ]P                  '       d   ^ RIt^ RIHt  ! R R] P                  4      t]P                  ]]P                  R.]3,          3,          t ! R R]4      t ! R	 R
]4      t ! R R]4      t]! 4       t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )    N)_utils)RetryCallStatec                   x   a  ] tR t^t o Rt]P                  V 3R lR l4       tV 3R lR ltV 3R lR lt	Rt
V tR	# )
	stop_basez(Abstract base class for stop strategies.c                $   < V ^8  d   QhRRRS[ /#    retry_stater   returnbool)format__classdict__s   "`/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/tenacity/stop.py__annotate__stop_base.__annotate__   s      $4      c                    R # N selfr
   s   &&r   __call__stop_base.__call__   s    r   c                "   < V ^8  d   QhRRRR/# )r	   otherr   r   stop_allr   )r   r   s   "r   r   r   "   s     % %[ %Z %r   c                    \        W4      # r   )r   r   r   s   &&r   __and__stop_base.__and__"       $$r   c                "   < V ^8  d   QhRRRR/# )r	   r   r   r   stop_anyr   )r   r   s   "r   r   r   %   s     % %K %J %r   c                    \        W4      # r   )r$   r   s   &&r   __or__stop_base.__or__%   r"   r   r   N)__name__
__module____qualname____firstlineno____doc__abcabstractmethodr   r    r&   __static_attributes____classdictcell__r   s   @r   r   r      s4     2 % %% %r   r   r   c                   H   a  ] tR t^,t o RtV 3R lR ltV 3R lR ltRtV tR# )r$   z+Stop if any of the stop condition is valid.c                $   < V ^8  d   QhRS[ RR/# r	   stopsr   Nr   )r   r   s   "r   r   stop_any.__annotate__/         y T r   c                    Wn         R # r   r5   r   r5   s   &*r   __init__stop_any.__init__/       
r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   r7   2        7 7$4 7 7r   c                   a \         ;QJ d)    V3R  lV P                   4       F  '       g   K   R# 	  R# ! V3R  lV P                   4       4      # )c              3   2   <"   T F  q! S4      x  K  	  R # 5ir   r   .0xr
   s   & r   	<genexpr>$stop_any.__call__.<locals>.<genexpr>3        6:a1[>>:   TF)anyr5   r   s   &fr   r   stop_any.__call__2   4    s64::6ss6s6s64::666r   r:   N	r(   r)   r*   r+   r,   r<   r   r/   r0   r1   s   @r   r$   r$   ,   s     5 7 7r   r$   c                   H   a  ] tR t^6t o RtV 3R lR ltV 3R lR ltRtV tR# )r   z*Stop if all the stop conditions are valid.c                $   < V ^8  d   QhRS[ RR/# r4   r6   )r   r   s   "r   r   stop_all.__annotate__9   r8   r   c                    Wn         R # r   r:   r;   s   &*r   r<   stop_all.__init__9   r>   r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   rP   <   r@   r   c                   a \         ;QJ d)    V3R  lV P                   4       F  '       d   K   R# 	  R# ! V3R  lV P                   4       4      # )c              3   2   <"   T F  q! S4      x  K  	  R # 5ir   r   rC   s   & r   rF   $stop_all.__call__.<locals>.<genexpr>=   rH   rI   FT)allr5   r   s   &fr   r   stop_all.__call__<   rL   r   r:   NrM   r1   s   @r   r   r   6   s     4 7 7r   r   c                   6   a  ] tR t^@t o RtV 3R lR ltRtV tR# )_stop_neverzNever stop.c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   _stop_never.__annotate__C   s      $4  r   c                    R # )Fr   r   s   &&r   r   _stop_never.__call__C   s    r   r   N)r(   r)   r*   r+   r,   r   r/   r0   r1   s   @r   rZ   rZ   @   s      r   rZ   c                   H   a  ] tR t^Jt o RtV 3R lR ltV 3R lR ltRtV tR# )stop_when_event_setz!Stop when the given event is set.c                "   < V ^8  d   QhRRRR/# )r	   eventzthreading.Eventr   Nr   )r   r   s   "r   r    stop_when_event_set.__annotate__M   s      / D r   c                    Wn         R # r   rb   )r   rb   s   &&r   r<   stop_when_event_set.__init__M   r>   r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   rc   P   s     # #$4 # #r   c                6    V P                   P                  4       # r   )rb   is_setr   s   &&r   r   stop_when_event_set.__call__P   s    zz  ""r   re   NrM   r1   s   @r   r`   r`   J   s     + # #r   r`   c                   H   a  ] tR t^Tt o RtV 3R lR ltV 3R lR ltRtV tR# )stop_after_attemptz.Stop when the previous attempt >= max_attempt.c                $   < V ^8  d   QhRS[ RR/# )r	   max_attempt_numberr   N)int)r   r   s   "r   r   stop_after_attempt.__annotate__W   s     5 53 54 5r   c                    Wn         R # r   rn   )r   rn   s   &&r   r<   stop_after_attempt.__init__W   s    "4r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   rp   Z   s      E E$4 E Er   c                4    VP                   V P                  8  # r   )attempt_numberrn   r   s   &&r   r   stop_after_attempt.__call__Z   s    ))T-D-DDDr   rr   NrM   r1   s   @r   rl   rl   T   s     85 5E Er   rl   c                   H   a  ] tR t^^t o RtV 3R lR ltV 3R lR ltRtV tR# )stop_after_delaya?  
Stop when the time from the first attempt >= limit.

Note: `max_delay` will be exceeded, so when used with a `wait`, the actual total delay will be greater
than `max_delay` by some of the final sleep period before `max_delay` is exceeded.

If you need stricter timing with waits, consider `stop_before_delay` instead.
c                8   < V ^8  d   QhRS[ P                  RR/# r	   	max_delayr   Nr   time_unit_type)r   r   s   "r   r   stop_after_delay.__annotate__h   !     6 6&"7"7 6D 6r   c                <    \         P                  ! V4      V n        R # r   r   
to_secondsr|   r   r|   s   &&r   r<   stop_after_delay.__init__h       **95r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   r   k   s      A A$4 A Ar   c                f    VP                   f   \        R4      hVP                   V P                  8  # Nz4__call__() called but seconds_since_start is not set)seconds_since_startRuntimeErrorr|   r   s   &&r   r   stop_after_delay.__call__k   s/    **2UVV..$..@@r   r|   NrM   r1   s   @r   ry   ry   ^   s      6 6A Ar   ry   c                   H   a  ] tR t^qt o RtV 3R lR ltV 3R lR ltRtV tR# )stop_before_delayz
Stop right before the next attempt would take place after the time from the first attempt >= limit.

Most useful when you are using with a `wait` function like wait_random_exponential, but need to make
sure that the max_delay is not exceeded.
c                8   < V ^8  d   QhRS[ P                  RR/# r{   r}   )r   r   s   "r   r   stop_before_delay.__annotate__y   r   r   c                <    \         P                  ! V4      V n        R # r   r   r   s   &&r   r<   stop_before_delay.__init__y   r   r   c                $   < V ^8  d   QhRRRS[ /# r   r   )r   r   s   "r   r   r   |   s     
 
$4 
 
r   c                    VP                   f   \        R4      hVP                   VP                  ,           V P                  8  # r   )r   r   upcoming_sleepr|   r   s   &&r   r   stop_before_delay.__call__|   s?    **2UVV++k.H.HH~~	
r   r   NrM   r1   s   @r   r   r   q   s     6 6
 
r   r   )r-   typingtenacityr   TYPE_CHECKING	threadingr   ABCr   UnionCallabler   	StopBaseTr$   r   rZ   
stop_neverr`   rl   ry   r   r   r   r   <module>r      s       	'% % LLFOO5E4F4L$MMN	7y 77y 7)  ]
#) #E EAy A&
	 
r   