
    i                     t   S SK Jr  S SKJrJrJr  S SKJr  S SKJ	r	  S SK
JrJrJrJrJrJr  S SKJrJr  S SKJr  \(       a  S SKJr   " S	 S
\\   5      r\" SS9S\S\\   4S j5       r\" SS9S\S   4S j5       r " S S\S   5      r\" 5       r\\" SS9S\S   4S j5       5       r " S S\\   5      rg)    )Callable)TYPE_CHECKINGAnyNoReturn)ConjectureDataget_pretty_function_description)ExRecurTSampledFromStrategySearchStrategyTis_hashable)	cacheabledefines_strategy)UniqueIdentifier)Neverc                   h    \ rS rSrSr\S\4S j5       rS\4S jr	S\
S\4S jrS\S\\-  4S	 jrS
rg)JustStrategy   a  A strategy which always returns a single fixed value.

It's implemented as a length-one SampledFromStrategy so that all our
special-case logic for filtering and sets applies also to just(x).

The important difference from a SampledFromStrategy with only one
element to choose is that JustStrategy *never* touches the underlying
choice sequence, i.e. drawing neither reads from nor writes to `data`.
This is a reasonably important optimisation (or semantic distinction!)
for both JustStrategy and SampledFromStrategy.
returnc                      U R                   S   $ )Nr   )elementsselfs    c/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/strategies/_internal/misc.pyvalueJustStrategy.value,   s    }}Q    c                     SR                  S U R                   5       5      nU R                  c  SU-   $ S[        U R                  5       SU 3$ )N c              3   J   #    U  H  u  pS U S[        U5       S3v   M     g7f).()Nr   ).0namefs      r   	<genexpr>(JustStrategy.__repr__.<locals>.<genexpr>1   s/      
0 vQ6q9:!<0s   !#znone()zjust(r%   )join_transformationsr   r	   )r   suffixs     r   __repr__JustStrategy.__repr__0   sX     
00
 
 ::f$$6tzzBC1VHMMr   recurc                 ,    [        U R                  5      $ N)r   r   r   r0   s     r   calc_is_cacheableJustStrategy.calc_is_cacheable9   s    4::&&r   datac                 8    U R                  U R                  5      $ r2   )
_transformr   r   r6   s     r   do_filtered_drawJustStrategy.do_filtered_draw<   s     tzz**r    N)__name__
__module____qualname____firstlineno____doc__propertyr
   r   strr.   r   boolr4   r   r   r:   __static_attributes__r<   r   r   r   r      s\    
  r    N# N'v '$ '+^ +=M8M +r   r   T)eagerr   r   c                     [        U /5      $ )aj  Return a strategy which only generates ``value``.

Note: ``value`` is not copied. Be wary of using mutable values.

If ``value`` is the result of a callable, you can use
:func:`builds(callable) <hypothesis.strategies.builds>` instead
of ``just(callable())`` to get a fresh value each time.

Examples from this strategy do not shrink (because there is only one).
)r   )r   s    r   justrH   C   s       r   )force_reusable_valuesNc                      [        S5      $ )zuReturn a strategy which only generates None.

Examples from this strategy do not shrink (because there is only
one).
N)rH   r<   r   r   nonerK   R   s     :r   c                       \ rS rSrS\S\4S jrS\S\4S jr	S\S\4S jr
S\4S jrS	\\/\4   S\S
   4S jrS\\/\4   SS4S jrS\\/S4   SS4S jrSrg)Nothing\   r0   r   c                     gNTr<   r3   s     r   calc_is_emptyNothing.calc_is_empty]       r   r6   c                     [        S5      e)NzThis should never happen)NotImplementedErrorr9   s     r   do_drawNothing.do_draw`   s     ""<==r   c                     grP   r<   r3   s     r   calc_has_reusable_values Nothing.calc_has_reusable_valuese   rS   r   c                     g)Nz	nothing()r<   r   s    r   r.   Nothing.__repr__h   s    r   packr   c                     U $ r2   r<   )r   r]   s     r   mapNothing.mapk       r   	conditionzSearchStrategy[Never]c                     U $ r2   r<   )r   rb   s     r   filterNothing.filtern   ra   r   expandzSearchStrategy[Any]c                     U $ r2   r<   )r   rf   s     r   flatmapNothing.flatmapq   s	     r   r<   N)r=   r>   r?   r@   r   rD   rQ   r   r   rV   rY   rC   r.   r   r   r   r_   rd   rh   rE   r<   r   r   rM   rM   \   s    6 d >N >x >
f  # #, 1H # 4 9P u&;;<	 r   rM   r   c                      [         $ )zThis strategy never successfully draws a value and will always reject on
an attempt to draw.

Examples from this strategy do not shrink (because there are none).
)NOTHINGr<   r   r   nothingrl   z   s	     Nr   c                   4    \ rS rSrS\S\4S jrS\4S jrSr	g)BooleansStrategy   r6   r   c                 "    UR                  5       $ r2   )draw_booleanr9   s     r   rV   BooleansStrategy.do_draw   s      ""r   c                     g)Nz
booleans()r<   r   s    r   r.   BooleansStrategy.__repr__   s    r   r<   N)
r=   r>   r?   r@   r   rD   rV   rC   r.   rE   r<   r   r   rn   rn      s!    #N #t ## r   rn   ) collections.abcr   typingr   r   r   #hypothesis.internal.conjecture.datar   hypothesis.internal.reflectionr	   *hypothesis.strategies._internal.strategiesr
   r   r   r   r   r   %hypothesis.strategies._internal.utilsr   r   hypothesis.utils.conventionsr   typing_extensionsr   r   rH   rK   rM   rk   rl   rD   rn   r<   r   r   <module>r}      s    % / / > J  N 9'!+&r* !+H ! !nQ' ! ! -nT"  .nW% 6 ) (   ~d+ r   