
    vKg              	         S SK Jr  S SKrS SKJrJrJrJrJrJ	r	J
r
JrJrJr  S SKrSSKJrJr  \(       a  S SKJrJr  \" S5      rOS r/ S	Qr\" S
SS9r\" S5      r\        SS j5       r\        SS j5       r        SS jr\        SS j5       r\        S S j5       r        S S jr\R6                  " SSSS9 " S S\R8                  \	\   5      5       r\\R6                  " SSSS9 " S S\\   \	\   5      5       5       r\\R6                  " SSSS9 " S S\\
   5      5       5       r\\\   \4   r g)!    )annotationsN)
TYPE_CHECKINGAsyncGenerator	AwaitableCallable	GeneratorGenericNoReturnTypeVarUnionoverload   )AlreadyUsedErrorremove_tb_frames)	ParamSpecfinalArgsTc                    U $ N )funcs    M/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/outcome/_impl.pyr   r      s        )ErrorOutcomeMaybeValueacapturecaptureValueTT)	covariantResultTr   c                    g r   r   sync_fnargskwargss      r   r   r   $   s     r   c                    g r   r   r$   s      r   r   r   .   s     r   c                     [        U " U0 UD65      $ ! [         a!  n[        US5      n[        U5      s SnA$ SnAff = f)zRun ``sync_fn(*args, **kwargs)`` and capture the result.

Returns:
  Either a :class:`Value` or :class:`Error` as appropriate.

r   Nr   BaseExceptionr   r   )r%   r&   r'   excs       r   r   r   7   sB    Wd-f-.. sA&Szs    
>9>>c                   #    g 7fr   r   async_fnr&   r'   s      r   r   r   I   
         c                   #    g 7fr   r   r.   s      r   r   r   R   r0   r1   c                   #     [        U " U0 UD6I Sh  vN 5      $  N! [         a!  n[        US5      n[        U5      s SnA$ SnAff = f7f)zRun ``await async_fn(*args, **kwargs)`` and capture the result.

Returns:
  Either a :class:`Value` or :class:`Error` as appropriate.

Nr   r*   )r/   r&   r'   r,   s       r   r   r   [   sJ     8T4V44554 sA&Szs;   A  A 
A
AA
 AA

AF)reprinitslotsc                      \ rS rSr% Sr\R                  " SSSS9rS\S'   SS jr	\
R                  SS j5       r\
R                  SS	 j5       r\
R                  SS
 j5       rSrg)r   m   a  An abstract class representing the result of a Python computation.

This class has two concrete subclasses: :class:`Value` representing a
value, and :class:`Error` representing an exception.

In addition to the methods described below, comparison operators on
:class:`Value` and :class:`Error` objects (``==``, ``<``, etc.) check that
the other object is also a :class:`Value` or :class:`Error` object
respectively, and then compare the contained objects.

:class:`Outcome` objects are hashable if the contained objects are
hashable.

F)defaulteqr5   bool
_unwrappedc                `    U R                   (       a  [        e[        R                  U SS5        g )Nr<   T)r<   r   object__setattr__selfs    r   _set_unwrappedOutcome._set_unwrapped   s!    ??""4t4r   c                    g)zReturn or raise the contained value or exception.

These two lines of code are equivalent::

   x = fn(*args)
   x = outcome.capture(fn, *args).unwrap()

Nr   r@   s    r   unwrapOutcome.unwrap       r   c                    g)zSend or throw the contained value or exception into the given
generator object.

Args:
  gen: A generator object supporting ``.send()`` and ``.throw()``
      methods.

Nr   rA   gens     r   sendOutcome.send   rG   r   c                   #    g7f)zSend or throw the contained value or exception into the given async
generator object.

Args:
  agen: An async generator object supporting ``.asend()`` and
      ``.athrow()`` methods.

Nr   rA   agens     r   asendOutcome.asend   s     r1   r   N)returnNonerR   r    rJ   z"Generator[ResultT, ValueT, object]rR   r"   rO   zAsyncGenerator[ResultT, ValueT]rR   r"   )__name__
__module____qualname____firstlineno____doc__attribr<   __annotations__rB   abcabstractmethodrE   rK   rP   __static_attributes__r   r   r   r   r   m   ss     wwuUCJC5
 	  	  	 r   r   )frozenr4   r6   c                  p    \ rS rSr% Sr\R                  " 5       rS\S'    SS jr	SS jr
SS jrSS jrS	rg
)r      zFConcrete :class:`Outcome` subclass representing a regular value.

    r    valuec                $    SU R                   < S3$ )NzValue())re   r@   s    r   __repr__Value.__repr__       

~Q''r   c                :    U R                  5         U R                  $ r   )rB   re   r@   s    r   rE   Value.unwrap   s    zzr   c                X    U R                  5         UR                  U R                  5      $ r   )rB   rK   re   rI   s     r   rK   
Value.send   s!    xx

##r   c                t   #    U R                  5         UR                  U R                  5      I S h  vN $  N7fr   )rB   rP   re   rN   s     r   rP   Value.asend   s*     ZZ

++++   /868r   NrR   strrT   rU   rV   )rW   rX   rY   rZ   r[   r\   r]   re   r^   rh   rE   rK   rP   ra   r   r   r   r   r      s0     GGIE6($,r   r   c                      \ rS rSr% Sr\R                  " \R                  R                  \	5      S9r
S\S'    SS jrSS jrSS jrSS	 jrS
rg)r      zIConcrete :class:`Outcome` subclass representing a raised exception.

    )	validatorr+   errorc                $    SU R                   < S3$ )NzError(rg   )rw   r@   s    r   rh   Error.__repr__   rj   r   c                N    U R                  5         U R                  n Ue! AA f = fr   )rB   rw   )rA   captured_errors     r   rE   Error.unwrap   s-     	%   s     $c                X    U R                  5         UR                  U R                  5      $ r   )rB   throwrw   rI   s     r   rK   
Error.send   s!    yy$$r   c                t   #    U R                  5         UR                  U R                  5      I S h  vN $  N7fr   )rB   athrowrw   rN   s     r   rP   Error.asend   s*     [[,,,,rq   r   Nrr   )rR   r
   )rJ   z$Generator[ResultT, NoReturn, object]rR   r"   )rO   z!AsyncGenerator[ResultT, NoReturn]rR   r"   )rW   rX   rY   rZ   r[   r\   r]   
validatorsinstance_ofr+   rw   r^   rh   rE   rK   rP   ra   r   r   r   r   r      sI      77//--m<E=  *(%,%-r   )r%   zCallable[ArgsT, NoReturn]r&   
ArgsT.argsr'   ArgsT.kwargsrR   r   )r%   zCallable[ArgsT, ResultT]r&   r   r'   r   rR   Value[ResultT] | Error)r/   z$Callable[ArgsT, Awaitable[NoReturn]]r&   r   r'   r   rR   r   )r/   z#Callable[ArgsT, Awaitable[ResultT]]r&   r   r'   r   rR   r   )!
__future__r   r_   typingr   r   r   r   r   r	   r
   r   r   r   r\   _utilr   r   typing_extensionsr   r   r   __all__r    r"   r   r   sABCr   r   r   r   r   r   r   <module>r      sA   " 
    52gE H	T	*
)
 
*  	
  
 
)  	 
)  	$ 
6  	 
 
5  	 
5  	$ Ud+5cggwv 5 ,5p t%t,,GFOWV_ , - ,0 t%t,)-GH )- - )-Z 	eFmU"#r   