
    i              	           S SK r S SKrS SKrS SKJr  S SKrS SKJr  \R                  " 5       S-  r	Sq
S\\-  S-  SS4S jrSS	.S
\S\S\4S jjrSqSS.S\S\S\SS4S jjrSS.S\SS4S jjrg)    N)Path)HypothesisSideeffectWarningz.hypothesis	directoryreturnc                 &    U c  S qg [        U 5      qg )N)r   __hypothesis_home_directory)r   s    W/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/configuration.pyset_hypothesis_home_dirr
      s    *3*;$i    T)intent_to_writenamesr   c                     U (       a  [        SSR                  U5      5        [        (       d(  [        R                  " S5      =n(       a  [        U5      q[        (       d  [        q[        R                  " U6 $ )Nzaccessing storage for {}/HYPOTHESIS_STORAGE_DIRECTORY)&check_sideeffect_during_initializationjoinr   osgetenvr   #__hypothesis_home_directory_defaultjoinpath)r   r   wheres      r	   storage_directoryr      s^    .&	

 '&II<==5=*.u+'&&&I#&//77r   F)
is_restartwhatfmt_argsr   c                <   [         b  g[        R                  S:  a}  U R                  " U6 nU(       a  SnO4S[        R
                  ;   d  [        R                  " S5      (       a  SnOSnSU S	U S
3nU(       a  US-  n[        R                  " U[        SS9  gX4q g)ab  Called from locations that should not be executed during initialization, for example
touching disk or materializing lazy/deferred strategies from plugins. If initialization
is in progress, a warning is emitted.

Note that computing the repr can take nontrivial time or memory, so we avoid doing so
unless (and until) we're actually emitting the warning.
Nr   z>between importing hypothesis and loading the hypothesis plugin_hypothesis_pytestplugin HYPOTHESIS_EXTEND_INITIALIZATIONz/during pytest plugin or conftest initializationzat import timezSlow code in plugin: avoid  zT!  Set PYTHONWARNINGS=error to get a traceback and show which plugin is responsible.zU Additionally, set HYPOTHESIS_EXTEND_INITIALIZATION=1 to pinpoint the exact location.   )
stacklevel)_first_postinit_what_hypothesis_globalsin_initializationformatsysmodulesr   r   warningswarnr   )r   r   r   msgwhentexts         r	   r   r   /   s     '		.	.	2kk8$SD'3;;6")).;
 ;
 ED
 $D *#av 6G G 	 kkD'	
 !%/r   )r)   r)   c                 T    [         b!  [         tpSq U (       a  [        U/UQ7SS06  ggg)a  Reset _first_postinit_what, so that we don't think we're in post-init. Additionally, if it
was set that means that there has been a sideeffect that we haven't warned about, so do that
now (the warning text will be correct, and we also hint that the stacktrace can be improved).
Nr   T)r"   r   )r)   r   r   s      r	   notice_initialization_restartedr.   ]   sA     '.#2    (r   )r   r&   r(   pathlibr   r#   hypothesis.errorsr   cwdr   r   strr
   boolr   r"   objectr   r.    r   r	   <module>r6      s    
 
    9&*hhj=&@ #" QsTzD'8 QT Q
 <@ 8c 8D 8D 8   6;+0
+0 +0.2+0	+0\ 59 T T r   