Ë
    iKêjÅ  ã                   óŠ  — d dl mZ d dlmZmZmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ d dlmZmZmZmZmZmZ d d	lmZmZ d d
lmZ  G d„ dee   «      Z ed¬«      dedee   fd„«       Z ed¬«      ded   fd„«       Z G d„ ded   «      Z e«       Z e ed¬«      ded   fd„«       «       Z! G d„ dee"   «      Z#y)é    )ÚCallable)ÚAnyÚNeverÚNoReturn)ÚCannotInvert)ÚChoiceT)ÚConjectureData)Úequal_values©Úget_pretty_function_description)ÚExÚRecurTÚSampledFromStrategyÚSearchStrategyÚTÚis_hashable)Ú	cacheableÚdefines_strategy)ÚUniqueIdentifierc                   ór   — e Zd ZdZedefd„«       Zdefd„Zde	de
fd„Zdedeez  fd„Zd	edeed
f   fd„Zy)ÚJustStrategya%  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                 ó    — | j                   d   S )Nr   )Úelements©Úselfs    úi/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/hypothesis/strategies/_internal/misc.pyÚvaluezJustStrategy.value,   s   € à�}‰}˜QÑÐó    c                 óž   — dj                  d„ | j                  D «       «      }| j                  €d|z   S dt        | j                  «      › d|› �S )NÚ c              3   óH   K  — | ]  \  }}}d |› dt        |«      › d�–— Œ y­w)ú.ú(ú)Nr   )Ú.0ÚnameÚfÚ_s       r   ú	<genexpr>z(JustStrategy.__repr__.<locals>.<genexpr>1   s4   è ø€ ò 
á��a˜ð �ˆv�QÔ6°qÓ9Ð:¸!Ô<ñ
ùs   ‚ "znone()zjust(r%   )ÚjoinÚ_transformationsr   r   )r   Úsuffixs     r   Ú__repr__zJustStrategy.__repr__0   sX   € Ø—‘ñ 
à"×3Ñ3ô
ó 
ˆð �:‰:ÐØ˜fÑ$Ð$ØÔ6°t·z±zÓBÐCÀ1ÀVÀHÐMÐMr   Úrecurc                 ó,   — t        | j                  «      S ©N)r   r   ©r   r/   s     r   Úcalc_is_cacheablezJustStrategy.calc_is_cacheable9   s   € Ü˜4Ÿ:™:Ó&Ð&r   Údatac                 ó<   — | j                  | j                  |¬«      S )N©r4   )Ú
_transformr   ©r   r4   s     r   Údo_filtered_drawzJustStrategy.do_filtered_draw<   s   € ð �‰˜tŸz™z°ˆÓ5Ð5r   r   .c                 ór   — t        | j                  | j                  d ¬«      |«      st        |›d| ›�«      ‚y)Nr6   z is not produced by © )r
   r7   r   r   ©r   r   s     r   Ú_invertzJustStrategy._invertB   s7   € Ü˜DŸO™O¨D¯J©J¸T˜OÓBÀEÔJÜ % Ð*>¸t¸hÐGÓHÐHØr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   Ústrr.   r   Úboolr3   r	   r   r9   r   Útupler   r=   r;   r   r   r   r      sx   „ ñ
ð ð �rò  ó ð ðN˜#ó Nð' vð '°$ó 'ð6 ^ð 6¸Ð=MÑ8Mó 6ð˜Sð  U¨7°C¨<Ñ%8ô r   r   T)Úeagerr   r   c                 ó   — t        | g«      S )a‚  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   H   s   € ô ˜˜Ó Ð r   )Úforce_reusable_valuesNc                  ó   — t        d«      S )z�Return a strategy which only generates None.

    Examples from this strategy do not shrink (because there is only
    one).
    N)rH   r;   r   r   ÚnonerK   W   s   € ô �‹:Ðr   c                   ó¢   — e Zd Zdedefd„Zdedefd„Zdedefd„Z	de
fd„Zdeegef   ded	   fd
„Zdeegef   ddfd„Zdeegdf   ddfd„Zy)ÚNothingr/   r   c                  ó   — y©NTr;   r2   s     r   Úcalc_is_emptyzNothing.calc_is_emptyb   ó   € Ør   r4   c                 ó   — t        d«      ‚)NzThis should never happen)ÚNotImplementedErrorr8   s     r   Údo_drawzNothing.do_drawe   s   € ô "Ð"<Ó=Ð=r   c                  ó   — yrO   r;   r2   s     r   Úcalc_has_reusable_valuesz Nothing.calc_has_reusable_valuesj   rQ   r   c                  ó   — y)Nz	nothing()r;   r   s    r   r.   zNothing.__repr__m   s   € Ør   Úpackr   c                 ó   — | S r1   r;   )r   rX   s     r   ÚmapzNothing.mapp   ó   € Øˆr   Ú	conditionzSearchStrategy[Never]c                 ó   — | S r1   r;   )r   r\   s     r   ÚfilterzNothing.filters   r[   r   ÚexpandzSearchStrategy[Any]c                 ó   — | S r1   r;   )r   r_   s     r   ÚflatmapzNothing.flatmapv   s	   € ð ˆr   N)r>   r?   r@   r   rD   rP   r	   r   rT   rV   rC   r.   r   r   r   rZ   r^   ra   r;   r   r   rM   rM   a   s«   „ ð 6ð ¨dó ð>˜Nð >¨xó >ð
¨fð ¸ó ð˜#ó ð˜ # ¨ Ñ,ð °ÀÑ1Hó ð ¨#¨°¨Ñ 4ð Ð9Pó ðØ ˜uÐ&;Ð;Ñ<ðà	 ôr   rM   r   c                  ó   — t         S )z®This 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   Únothingrd      s	   € ô €Nr   c                   óB   — e Zd Zdedefd„Zdedeedf   fd„Z	de
fd„Zy)	ÚBooleansStrategyr4   r   c                 ó"   — |j                  «       S r1   )Údraw_booleanr8   s     r   rT   zBooleansStrategy.do_draw‹   s   € Ø× Ñ Ó"Ð"r   r   .c                 óD   — t        |t        «      st        |›d�«      ‚|fS )Nz is not a bool)Ú
isinstancerD   r   r<   s     r   r=   zBooleansStrategy._invertŽ   s%   € Ü˜%¤Ô&Ü % ¨.Ð9Ó:Ð:Øˆxˆr   c                  ó   — y)Nz
booleans()r;   r   s    r   r.   zBooleansStrategy.__repr__“   s   € Ør   N)r>   r?   r@   r	   rD   rT   r   rE   r   r=   rC   r.   r;   r   r   rf   rf   Š   s=   „ ð#˜Nð #¨tó #ð˜Sð  U¨7°C¨<Ñ%8ó ð
˜#ô r   rf   )$Úcollections.abcr   Útypingr   r   r   Úhypothesis.errorsr   Ú%hypothesis.internal.conjecture.choicer   Ú#hypothesis.internal.conjecture.datar	   Ú)hypothesis.internal.conjecture.junkdrawerr
   Úhypothesis.internal.reflectionr   Ú*hypothesis.strategies._internal.strategiesr   r   r   r   r   r   Ú%hypothesis.strategies._internal.utilsr   r   Úhypothesis.utils.conventionsr   r   rH   rK   rM   rc   rd   rD   rf   r;   r   r   ú<module>rv      sî   ðõ %ß 'Ñ 'å *Ý 9Ý >Ý BÝ J÷÷ ÷ NÝ 9ô&Ð& rÑ*ô &ñR ˜Ôð!�ð !�n QÑ'ò !ó ð!ñ ¨Ô-ðˆn˜TÑ"ò ó .ðôˆn˜WÑ%ô ñ6 ‹)€ð Ù˜Ôð� Ñ(ò ó ó ðô
�~ dÑ+õ 
r   