
    iU2                        S r SSKrSSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
Jr  SSKJr   SSKrSr SSKr\R$                  R'                  S5        \R(                  " S	S
0S9\R*                  " 5       S 5       5       rS\S\4S jrS r\R7                  5       \R8                  " S\SSS9S 5       5       r\R7                  5       \R8                  " S\SSS9\R<                  " SSSSS9\R<                  " SSSSS9\R<                  " SSS S!S9\R<                  " S"SS#S$S9\R<                  " S%SS&S'S9\R<                  " S(\R>                  " S)S*/5      \(       a  S)OS*S+S,9\R<                  " S-S.S/\SS0S19\R<                  " S2SS3S49S5 5       5       5       5       5       5       5       5       5       5       r g! \ a    Sr GNf = f! \ a    S6 r gf = f)7a   
::

    $ hypothesis --help
    Usage: hypothesis [OPTIONS] COMMAND [ARGS]...

    Options:
      --version   Show the version and exit.
      -h, --help  Show this message and exit.

    Commands:
      codemod  `hypothesis codemod` refactors deprecated or inefficient code.
      fuzz     [hypofuzz] runs tests with an adaptive coverage-guided fuzzer.
      write    `hypothesis write` writes property-based tests for you!

This module requires the :pypi:`click` package, and provides Hypothesis' command-line
interface, for e.g. :ref:`'ghostwriting' tests <ghostwriter>` via the terminal.
It's also where `HypoFuzz <https://hypofuzz.com/>`__ adds the :command:`hypothesis fuzz`
command (`learn more about that here <https://hypofuzz.com/docs/quickstart.html>`__).
    N)get_close_matches)partial)Pool)Pathz
The Hypothesis command-line interface requires the `{}` package,
which you do not have installed.  Run:

    python -m pip install --upgrade 'hypothesis[cli]'

and try again.
.help_option_names)z-hz--help)context_settingsc                      g )N r       S/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/extra/cli.pymainr   H   s     	r   sreturnc                    U R                  5       n SU ;   d  SU ;   a  [        R                  " S5      Se [        R                  " U 5      $ ! [
         a     Of = fSnSU ;  a
  S[        U pCnOU R                  SS5      u  p$ [        R                  " U5      nO! [
         a  n UR                  SS5      u  p![        R                  " U5      n SnAOd! [
        [        4 aI    U R                  S5      (       a  [        R                  " S	5      Se[        R                  " S
U S35      Uef = fSnAff = fS[        R                  S[        S[        4S jnUcj   [        X45      $ ! [         aQ  nUS:X  a  [        R                  " SU SS  35      Se[        R                  " SU< SU< S3U" X45      -   5      UeSnAff = f [        X15      nO;! [         a.  n[        R                  " SU< SU< S3U" X15      -   5      UeSnAff = f [        Xt5      $ ! [         aU  n[        R                   " U5      (       a  SnOSn[        R                  " SU< SU< SU SU< S3	U" Xt5      -   5      UeSnAff = f)z@This "type" imports whatever object is named by a dotted string./\zPRemember that the ghostwriter should be passed the name of a module, not a path.Nr   builtins   z.pyzPRemember that the ghostwriter should be passed the name of a module, not a file.zFailed to import the z^ module for introspection.  Check spelling and your Python import path, or use the Python API?module_or_classobjnamer   c                     [        U 5       Vs/ s H  o"R                  S5      (       a  M  UPM     nn[        X5      nU(       a  SU< 3$ gs  snf )N_z  Closest matches:  )vars
startswithr   )r   r   namepublic_namesmatchess        r   describe_close_matches(obj_name.<locals>.describe_close_matchesm   sS     "&o!6!6ooc>R!6   (>G,WK88s
   AApyzhRemember that the ghostwriter should be passed the name of a module, not a file.
	Try: hypothesis write z
Found the z module, but it doesn't have a z attribute.z class.class	attributez module and  z, but it doesn't have a )stripclick
UsageError	importlibimport_moduleImportErrorr   rsplit
ValueErrorendswithtypes
ModuleTypestrgetattrAttributeErrorinspectisclass)	r   	classname
modulenamemodulefuncnameerrr    
func_classfunc_class_iss	            r   obj_namer>   M   s   GGI!8tqy""b	**1-- 			a<+5xJ#$88C#3 J"00< ,6,=,=c1,E)J&44Z@F#Z0 zz%((#..n#$  **/
| <] ] 	
	"--
	8;
	
	 v00! t#**556sVH>    && .Ml+/,V>? 	$V7
! && .M m7,.DV.WX 
z44! 	??:..$+M$/M&& l9-q X--5LE,ZBC 		s   A 
AAB 
D4$*CAD,,D//D4
E' '
G1AF==GG 
H
)HH

H 
I8#AI33I8c                     [        U5      R                  SS9nSU;  a  g  U " U5      nXB:w  a  [        U5      R                  USS9  g g ! [        [        4 a  nSU< SU 3s S nA$ S nAff = f! [         a`  nSSKJn  [        X55      (       aD  SSKJ	n  U" [        U5      R                  S	S
5      S5      R                  5       nSU< SU 3s S nA$ e S nAff = f)Nzutf-8)encodingz	skipping z due to 
hypothesisr   )ParserSyntaxError)indentz


z    )r   	read_textOSErrorUnicodeError	ExceptionlibcstrB   
isinstancehypothesis.extra._patchingrC   r2   replacer'   
write_text)funcfnameoldcoder;   newcoderB   rC   msgs           r   	_refactorrS      s    	65k++W+=G
 w&
	7mG K""7W"= ' & 	6uixu55	6  	0#11=SX--fd;VDJJL"5)8C599	sA   A
 A0 
A-A("A-(A-0
C:ACCCCpathT)typerequirednargsc                 Z    SSK Jn  SSKJn  SU ;   ai  [        U 5      S:  a  [        S5      e[        S[
        R                  S	9  [        WR                  [
        R                  R                  5       5      5        gW" U 5      n[        5       n[        U5      S::  a&  UR!                  [#        WR                  /UQ76 5        OU[%        5        nUR'                  [)        ["        WR                  5      U5       H  nUR!                  U5        M     S
S
S
5        UR+                  S
5        U H  n[        U[
        R                  S	9  M     U(       a  S$ S$ ! [         a9    [
        R                  R                  S5        [
        R                  " S5         GNf = f! , (       d  f       N= f)a  `hypothesis codemod` refactors deprecated or inefficient code.

It adapts `python -m libcst.tool`, removing many features and config options
which are rarely relevant for this purpose.  If you need more control, we
encourage you to use the libcst CLI directly; if not this one is easier.

PATH is the file(s) or directories of files to format in place, or
"-" to read from stdin and write to stdout.
r   )gather_files)codemodszYou are missing required dependencies for this option.  Run:

    python -m pip install --upgrade hypothesis[codemods]

and try again.r   -z6Cannot specify multiple paths when reading from stdin!zCodemodding from stdinfileN)libcst.codemodrZ   hypothesis.extrar[   r,   sysstderrwriteexitlenrH   printrefactorstdinreadsetaddrS   r   imap_unorderedr   discard)rT   rZ   r[   fileserrorspoolrR   s          r   codemodrq      sN   
	31 $;4y1}L  *<(##CIINN$456 T"u:?JJy!2!2;U;<4..Ix'8'895C JJsO 
 	tC#CJJ' q!!A  	JJ!
 HHQK	0 s   E AF?FF
F*rN   z--roundtripwriter	roundtripz-start by testing write/read or encode/decode!)
flag_valuehelpz--equivalent
equivalentz/very useful when optimising or refactoring codez--errors-equivalenterrors-equivalentz/--equivalent, but also allows consistent errorsz--idempotent
idempotentzcheck that f(x) == f(f(x))z--binary-opbinary_operationz.associativity, commutativity, identity elementz--stylepytestunittestz0pytest-style function, or unittest-style method?)rV   defaultru   z-ez--exceptexcept_z%dotted name of exception(s) to ignore)rV   multipleru   z--annotate/--no-annotatez\force ghostwritten tests to be type-annotated (or not).  By default, match the code to test.)r|   ru   c                    U=(       d    SX4S.nUc  SnOZUS:X  a%  [        U 5      S:  a  [        R                  " S5      eUS:X  a  [        U 5      S:X  a  SnOS	U;   a  [        U 5      S:X  a  S
nUS:X  a  S	nSUS'    SSKJn  [        WU5      " U 0 UD6n SSKJn  SSKJn	  SSKJn
   U
" 5       S:X  a  SOSnU	" USSUS9nU" 5       R'                  USS9  g! [
         aK    [        R                  R                  [        R                  S5      5        [        R                  " S5         Nf = f! [(         a&    ['        S[        R                  S9  ['        U5         gf = f! [
         a    ['        U5         gf = f)aB  `hypothesis write` writes property-based tests for you!

Type annotations are helpful but not required for our advanced introspection
and templating logic.  Try running the examples below to see how it works:


    hypothesis write gzip
    hypothesis write numpy.matmul
    hypothesis write pandas.from_dummies
    hypothesis write re.compile --except re.error
    hypothesis write --equivalent ast.literal_eval eval
    hypothesis write --roundtrip json.dumps json.loads
    hypothesis write --style=unittest --idempotent sorted
    hypothesis write --binary-op operator.add
r   )r}   styleannotateNmagicrx   r   z-Test functions for idempotence one at a time.rs   rv   fuzzrw   Tallow_same_errorsr   )ghostwriterblack)Console)Syntax)guess_background_colorlightr|   monokaipython)background_colortheme)	soft_wrapz&# Error while syntax-highlighting coder]   )re   r(   r)   r`   r   r,   ra   rb   rc   MESSAGEformatrd   r3   rich.consoler   rich.syntaxr   hypothesis.utils.terminalr   rf   rH   )rN   rr   r}   r   r   kwargsr   coder   r   r   r   s               r   rc   rc      sc   R %]UQ>F|#D	A""#RSS{"s4yA~!FV#D	QF((!F*.F&'	4
 {F+T<V<	,*H%;%=%H	idHyPUV	5!  	JJW^^G45HHQK	"  >SZZPd  	$K	s7   =C E" )-D/ AD,+D,/-EE"E:9E:c                      [         R                  R                  [        R	                  S5      5        [         R
                  " S5        g)zCIf `click` is not installed, tell the user to install it then exit.r(   r   N)ra   rb   rc   r   r   rd   r   r   r   r   r   <   s(    

01r   )!__doc__r   r*   r5   ra   r0   difflibr   	functoolsr   multiprocessingr   pathlibr   rz   r,   r   r(   rT   appendgroupversion_optionr   r2   objectr>   rS   commandargumentrq   optionChoicerc   r   r   r   <module>r      s?  *    
  %    [ HHOOC
[[#68H"IJ
  KNC NF N`>2 
\\^
^^Ft2>." ? ."` 
\\^
^^FDC
\\<	 \\>	 \\&>	 \\)	 \\%=	 \\\\8Z01"
?	 \\4 \\".5 D l5e  F  s"   F3 G 3F?>F?	GG