
    i                        % 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rSSKrSSKJ	r	J
r
JrJr  SSKJrJrJrJr  SSKJrJr  SSKJrJr  SSKJr  SSKJrJr  SS	KJrJr  SS
K J!r!J"r"J#r#J$r$J%r%  \!(       a  SSK&J'r'  \%" S5      r(\\"S\)/S4   r*\$\+S'   \,\-\.\/\/4   4   r0\$\+S'   / SQr1SeS\2S\-S\"S-  S\"4S jjr3SS.S\2S\)S\-4S jjr4 " S S5      r5 " S S5      r6 " S S5      r7 " S S \75      r8 " S! S"\75      r9 " S# S$\75      r: " S% S&5      r;S'\-S(\-S)\<S\*4S* jr=S+\<\2   S\-4S, jr>S'\-S(\-S)\<\2   S\*4S- jr? SeS'\-S(\-S)\<\2   S-  S\*4S. jjr@S\"S/\6S\)SS4S0 jrAS\R                  S/\6S\)SS4S1 jrCS\<\2   S/\6S\)SS4S2 jrDS\2S/\6S\)SS4S3 jrES\2S/\6S\)S4\\-   SS4
S5 jrFS/\6S6\0S7\"S\.\-\.\/\/4   4   S-  4S8 jrGS6\0S\*4S9 jrHS6\0S:\,\"\"4   S\*4S; jrIS\R                  \R                  -  \R                  -  S/\6S\)SS4S< jrMS\NS/\6S\)SS4S= jrOS\/S/\6S\)SS4S> jrPS\QS/\6S\)SS4S? jrR0 \/\P_\Q\R_\-\E_\.\=" S@SA\.5      _\S\=" SBSC\S5      _\,\@" SDSE\,5      _\T\?" SDSE\T5      _\U\?" SFSG\U5      _\V\A_\R                  \C_\<\D_\R                  \M_\R                  \M_\R                  \M_\R                  \E_\R                  \E_\N\O_\X\E\Y\E\Z\E0Er[\,\<\*4   \+SH'   0 r\\,\.\-\-4   \*4   \+SI'   SJ\-SK\-SL\*S\*S-  4SM jr]\,R                  \_" \`SSNS\a\b/5      \E5      rc\,\/\*4   \+SO'   S\\2\24   S/\6S\)SS4SP jrdS\
\2\24   S/\6S\)SS4SQ jreS\\2   S/\6S\)SS4SR jrfS\	\2   S/\6S\)SS4SS jrgS\2S/\6S\)SS4ST jrhS\S/\6S\)SS4SU jri " SV SW5      rjS\\"   S/\6S\)SS4SX jrk\]" SYSZ\d5        \]" SYS[\e5        \]" S\S[\e5        \]" SYS]\f5        \]" SYS^\g5        \]" S_S`\h5        \]" SaSb\i5        \]" ScSd\k5        g)fa  
Python advanced pretty printer.  This pretty printer is intended to
replace the old `pprint` python module which does not allow developers
to provide their own pretty print callbacks.
This module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`.
Example Usage
-------------
To get a string of the output use `pretty`::
    from pretty import pretty
    string = pretty(complex_object)
Extending
---------
The pretty library allows developers to add pretty printing rules for their
own objects.  This process is straightforward.  All you have to do is to
add a `_repr_pretty_` method to your object and call the methods on the
pretty printer passed::
    class MyObject(object):
        def _repr_pretty_(self, p, cycle):
            ...
Here is an example implementation of a `_repr_pretty_` method for a list
subclass::
    class MyList(list):
        def _repr_pretty_(self, p, cycle):
            if cycle:
                p.text('MyList(...)')
            else:
                with p.group(8, 'MyList([', '])'):
                    for idx, item in enumerate(self):
                        if idx:
                            p.text(',')
                            p.breakable()
                        p.pretty(item)
The `cycle` parameter is `True` if pretty detected a cycle.  You *have* to
react to that or the result is an infinite loop.  `p.text()` just adds
non breaking text to the output, `p.breakable()` either adds a whitespace
or breaks here.  If you pass it an argument it's used instead of the
default space.  `p.pretty` prettyprints another object using the pretty print
method.
The first parameter to the `group` function specifies the extra indentation
of the next line.  In this example the next item will either be on the same
line (if the items are short enough) or aligned with the right edge of the
opening bracket of `MyList`.
If you just want to indent something you can use the group function
without open / close parameters.  You can also use this code::
    with p.indent(2):
        ...
Inheritance diagram:
.. inheritance-diagram:: IPython.lib.pretty
   :parts: 3
:copyright: 2007 by Armin Ronacher.
            Portions (c) 2009 by Robert Kern.
:license: BSD License.
    N)CounterOrderedDictdefaultdictdeque)Callable	GeneratorIterableSequence)contextmanagersuppress)EnumFlag)partial)StringIO
TextIOBase)copysignisnan)TYPE_CHECKINGAnyOptional	TypeAliasTypeVar)BuildContextTRepresentationPrinterPrettyPrintFunction
ArgLabelsT)IDKeyr   _fixeddict_pprinter_tuple_pprinterprettyobjattrdefaultreturnc                 @     [        XU5      $ ! [         a    Us $ f = f)zoSafe version of getattr.

Same as getattr, but will return ``default`` on any Exception,
rather than raising.

)getattr	Exception)r"   r#   r$   s      W/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/vendor/pretty.py_safe_getattrr*   a   s(    s'** s    Fcycler,   c                T    [        5       nUR                  XS9  UR                  5       $ )z)Pretty print the object's representation.r+   )r   r!   getvalue)r"   r,   printers      r)   r!   r!   n   s'    #%GNN3N$    c                   B    \ rS rSrS\4S jrS\4S jrS\S\4S jr	Sr
g	)
r   u   valuec                     Xl         g Nr3   )selfr3   s     r)   __init__IDKey.__init__v   s    
r0   r%   c                 T    [        [        U 5      [        U R                  5      45      $ r5   )hashtypeidr3   r7   s    r)   __hash__IDKey.__hash__y   s    T$ZDJJ011r0   	_IDKey__oc                     [        U[        U 5      5      =(       a+    [        U R                  5      [        UR                  5      :H  $ r5   )
isinstancer<   r=   r3   )r7   rA   s     r)   __eq__IDKey.__eq__|   s-    #tDz*Nr$**~CII/NNr0   r6   N)__name__
__module____qualname____firstlineno__objectr8   intr?   boolrD   __static_attributes__ r0   r)   r   r   u   s0    f 2# 2O& OT Or0   r   c                   
   \ rS rSrSr S.SS.S\S-  S\S   SS4S	 jjjrS
S.S\S\	SS4S jjr
S/S jrS\SS4S jrS0S\SS4S jjrS/S jr\S\S\S   4S j5       r\ S1S\S\S\S\S   4S jj5       rS2S\S\SS4S jjrS2S\S\SS4S jjrS\\   S\\\\4   SS4   4S jrS/S jrS\4S  jr S.S\S\	S!\S"\\   S#\\\4   S$\S-  SS4S% jjr SSSS
S&.S'\S"\\   S#\\\4   S(\	S-  S)\S-  S*\S-  S+\	SS4S, jjr!S-r"g)3r      zSpecial pretty printer that has a `pretty` method that calls the pretty
printer for a python object.

This class stores processing data on `self` so you must *never* use
this class in a threaded environment.  Always lock it or
reinstantiate it.

N)contextoutputrQ   r   r%   c                   SU l         Uc
  [        5       OUU l        SU l        SU l        SU l        SU l        [        5       U l        [        S5      nU/U l
        [        U5      U l        SU l        / U l        0 U l        0 U l        0 U l        S[$        R&                  ;   a  [$        R&                  S   nU R                  R)                  UR*                  5        U R                   R)                  UR,                  5        U R"                  R)                  UR.                  5        U R                  R)                  [*        5        U R                   R)                  [,        5        U R"                  R)                  [.        5        U   U   Uc  [1        [2        5      U l        0 U l        O,UR4                  U l        UR8                  R6                  U l        [;        S U R4                   5       5      (       d   e[=        5       U l        g)a  Optionally pass the output stream and the current build context.

We use the context to represent objects constructed by strategies by showing
*how* they were constructed, and add annotations showing which parts of the
minimal failing example can vary without changing the test result.
FNO   i  r   zIPython.lib.prettyc              3   B   #    U  H  n[        U[        5      v   M     g 7fr5   )rC   r   ).0ks     r)   	<genexpr>1RepresentationPrinter.__init__.<locals>.<genexpr>   s     L1KA:a''1Ks   ) brokenr   rR   	max_widthmax_seq_lengthoutput_widthbuffer_widthr   bufferGroupgroup_stack
GroupQueuegroup_queueindentationstacksingleton_pprinterstype_pprintersdeferred_pprinterssysmodulesupdate_singleton_pprinters_type_pprinters_deferred_type_pprintersr   listknown_object_printersslice_commentsdataallset_commented_slices)r7   rR   rQ   
root_groupipps        r)   r8   RepresentationPrinter.__init__   s    "06(*F #'!"!"/4w1X
&<%j1 ! "
CE ?ANP3;;.++23C$$++C,D,DE&&s':':;##**3+G+GH  ''(<=""?3&&'?@ 	?)4T):D&"$D)0)F)FD&"),,"="=DL1K1KLLLLL 8;ur0   Fr+   r"   r,   c                   [        U5      nU=(       d    X0R                  ;   nU R                  R                  U5         U R                  5          [	        USS5      =(       d    [        U5      n U R                  U   nU" XU5      sSSS5        U R                  R                  5         $ ! [        [        4 a     Of = f[	        USS5      n[        U5      (       a+  U" X5      sSSS5        U R                  R                  5         $ U R                  [        U5         n[        U5      S:X  a/  US   " XU5      sSSS5        U R                  R                  5         $ U(       a  [        5       nU H5  n	[        5       n
U	" XU5        UR!                  U
R#                  5       5        M7     [        U5      S:X  a/  US   " XU5      sSSS5        U R                  R                  5         $ UR$                   GH  nXR&                  ;   a;  U R&                  U   " XU5      s  sSSS5        U R                  R                  5         $ [	        USS5      [	        USS5      4nXR(                  ;   aW  U R(                  R                  U5      nXPR&                  U'   U" XU5      s  sSSS5        U R                  R                  5         $ [+        US5      (       ap  [-        UU UUR.                   Vs/ s H!  oR0                  (       d  M  UR2                  PM#     Os  snf sn5      s  sSSS5        U R                  R                  5         $ [+        US	5      (       d  GMc  [-        UU UUR4                  R7                  5        VVs/ s H  u  pUR0                  (       d  M  UPM     Os  snnf snn5      s  sSSS5        U R                  R                  5         $    [9        XU5      sSSS5        U R                  R                  5         $ ! , (       d  f       O= f U R                  R                  5         g! U R                  R                  5         f = f)
zPretty print the given object.	__class__N_repr_pretty_   r   rG   rF   __attrs_attrs____dataclass_fields__)r=   re   appendgroupr*   r<   rf   pop	TypeErrorKeyErrorcallablerp   r   lenrt   r   addr.   __mro__rg   rh   hasattrpprint_fieldsr}   initnamer~   items_repr_pprint)r7   r"   r,   obj_id	obj_classr/   pretty_methodprintersstrsfpclskeyatrW   vs                   r)   r!   RepresentationPrinter.pretty   s   C-::-

&!Q	)#{DANT#Y	5"66v>G #3e4 ` JJNNW "8,  !.c?D IM**(5# ` JJNNs  55eCjAx=A%#A;s%83 ` JJNNm  5D%13#%(. & 4yA~'{3e<I ` JJNNO %,,C111#22375IIY ` JJNN? *#|TB)#z4@ "9"99&*&=&=&A&A#&FG7>//4#*3e#<<q ` JJNN-  's,=>>'4$'$($)7:7J7J$V7JggWRWW7J$V	(" !"w ` JJNN  's,BCC'4$'$($) 584L4L4R4R4T%&4TDA+,66 )*4T%&		(" 	!"E ` JJNNO -J $Cu5] ` JJNNa ` JJNNDJJNNs   P0  P0B+?P	P0 +B>;P=B>>'P%	P0 	2P;	P0 A&P	P0 )6P	P0 AP	P0 'P*LLP 	P0 P%P=NNP.	P0 P	P0 
PP0 0Qc                    U R                   U R                  U R                  -   :  Ga  U R                  R	                  5       nU(       d  g UR
                  (       aw  U R                  R                  5       nUR                  U R                  U R                  5      U l        U =R                  UR                  -  sl        UR
                  (       a  Mw  U R                  (       a  [        U R                  S   [        5      (       a  U R                  R                  5       nUR                  U R                  U R                  5      U l        U =R                  UR                  -  sl        U R                  (       a$  [        U R                  S   [        5      (       a  M  U R                   U R                  U R                  -   :  a  GM  g g Nr   )r[   r]   r^   rc   deq
breakablesr_   popleftrR   widthrC   Text)r7   r   xs      r)   _break_outer_groups)RepresentationPrinter._break_outer_groups  s4   nnt0043D3DDD$$((*E""KK'')$%HHT[[$:K:K$L!!!QWW,! """ ++*T[[^T"B"BKK'')$%HHT[[$:K:K$L!!!QWW,! ++*T[[^T"B"B nnt0043D3DDDDr0   c                    [        U5      nU R                  (       a  U R                  S   n[        U[        5      (       d%  [        5       nU R                  R	                  U5        UR                  X5        U =R                  U-  sl        U R                  5         gU R                  R                  U5        U =R                  U-  sl
        g)zAdd literal text to the output.N)r   r_   rC   r   r   r   r^   r   rR   writer]   )r7   r"   r   texts       r)   r   RepresentationPrinter.text*  s    C;;;;r?DdD))v""4(HHS &$$&KKc"&r0   sepc                    [        U5      nU R                  S   nUR                  (       aT  U R                  5         U R                  R                  SSU R                  -  -   5        U R                  U l        SU l        gU R                  R                  [        XU 5      5        U =R                  U-  sl        U R                  5         g)zAdd a breakable separator to the output.

This does not mean that it will automatically break here.  If no
breaking on this position takes place the `sep` is inserted
which default to one space.

r   
 r   N)r   ra   
want_breakflushrR   r   rd   r]   r^   r_   r   	Breakabler   )r7   r   r   r   s       r)   	breakableRepresentationPrinter.breakable9  s     C  $JJLKKdS4+;+;%;;< $ 0 0D !DKKyT:;&$$&r0   c                     U R                  5         U R                  R                  SSU R                  -  -   5        U R                  U l        SU l        g)zMExplicitly insert a newline into the output, maintaining correct
indentation.r   r   r   N)r   rR   r   rd   r]   r^   r>   s    r)   break_RepresentationPrinter.break_M  sE     	

$t'7'7!778 ,,r0   indent)NNNc              #      #    U =R                   U-  sl          Sv   U =R                   U-  sl         g! U =R                   U-  sl         f = f7f)z1`with`-statement support for indenting/dedenting.N)rd   )r7   r   s     r)   r   RepresentationPrinter.indentU  sB      	F"	'&D&s   A3 AA

Aopenclosec              #   z   #    U R                  XS9   Sv   U R                  XS9  g! U R                  XS9  f = f7f)zContext manager for an indented group.

    with p.group(1, '{', '}'):

The first parameter specifies the indentation for the next line
(usually the width of the opening text), the second and third the
opening and closing delimiters.
)r   r   N)dedentr   )begin_group	end_group)r7   r   r   r   s       r)   r   RepresentationPrinter.group^  s<      	2	7NN&N6DNN&N6s   ;' ;8;c                    U(       a  U R                  U5        [        U R                  S   R                  S-   5      nU R                  R	                  U5        U R
                  R                  U5        U =R                  U-  sl        g)zUse the `with group(...) context manager instead.

The begin_group() and end_group() methods are for IPython compatibility only;
see https://github.com/HypothesisWorks/hypothesis/issues/3721 for details.
r   r|   N)r   r`   ra   depthr   rc   enqrd   )r7   r   r   r   s       r)   r   !RepresentationPrinter.begin_groupp  sk     IIdOd&&r*00145&U#F"r0   r   c                     U =R                   U-  sl         U R                  R                  5       nUR                  (       d  U R                  R                  U5        U(       a  U R                  U5        gg)zSee begin_group().N)rd   ra   r   r   rc   remover   )r7   r   r   r   s       r)   r   RepresentationPrinter.end_group}  sX    F"  $$&##E*IIe r0   seqc              #      #    [        U5       H^  u  p#U R                  (       aC  X R                  :  a4  U R                  S5        U R                  5         U R                  S5          gX#4v   M`     g7f)z?Like enumerate, but with an upper limit on the number of items.,...N)	enumerater\   r   r   )r7   r   idxr   s       r)   
_enumerate RepresentationPrinter._enumerate  sT     nFC""s.A.A'A		# 		% &L %s   A/A1c                     U R                    H<  nU =R                  UR                  U R                  U R                  5      -  sl        M>     U R                   R                  5         SU l        g)z&Flush data that is left in the buffer.r   N)r_   r]   rR   clearr^   )r7   rr   s     r)   r   RepresentationPrinter.flush  sN    KKDT[[$:K:K!LL  r0   c                     [        U R                  [        5      (       d   eU R                  5         U R                  R	                  5       $ r5   )rC   rR   r   r   r.   r>   s    r)   r.   RepresentationPrinter.getvalue  s5    $++x0000

{{##%%r0   r   argskwargs
arg_labelsc                    U(       a  U R                  S5      $ 0 nUb;  UR                  5        H'  u  pXR                  ;   d  M  U R                  U	   Xx'   M)     U(       d  [        [        5         [
        R                  " [        U5      5        [        5       n
U R                  R                  5       U
l	        U R                  U
l        U
R                  X4U5         [
        R                  " U
R                  5       5         S S S 5        U R                  X4XVS9$ ! [         a    [        XU5      s sS S S 5        $ f = f! , (       d  f       NC= f)Nz<...>)
arg_slices)r   r   rq   r   r(   astparsereprr   re   copyrp   	repr_callr.   r   )r7   r"   r,   r   r   r   r   commentsr   srr   s              r)   maybe_repr_known_object_as_call5RepresentationPrinter.maybe_repr_known_object_as_call  s    99W%%!%++-,,,$($7$7$;HM . )$		$s)$)+**//+*.*D*D'D/:IIajjl+ % ~~d&~HH ! :'599 %$: %$s+   /A,D>$DD;/D>:D;;D>>
E)force_splitr   leading_commentavoid_realization	func_namer   r   r   r   c                T  ^ [        U[        5      (       d   eUR                  S5      (       a  SU S3nU R                  U5        [	        U5       VV	s/ s H  u  pSU S3U	4PM     n
nn	U
[        UR                  5       5      -  n
U=(       d    0 n0 mUR                  5        H;  u  pXR                  ;   d  M  XR                  ;  d  M'  U R                  U   U4TU'   M=     U(       d  [        U4S jU
 5       5      (       a  SnUcm  [        5       nU R                  R                  5       Ul        U R                  Ul        UR                  S	U R                  -  X#S
S9  UR!                  5       nSU;   nU R#                  SSSS9   [	        U
5       GHC  u  nu  pU(       a?  US:X  a(  U(       a!  U R%                  5         U R                  U5        U R%                  5         OUb   eU R'                  U(       a  SOS5        UR                  S5      (       d  U R                  U S35        TR)                  U5      nU(       a  U R                  R+                  US   5        U(       a  U R                  S5        OU R-                  U	5        U(       d  US-   [/        U
5      :  a  U R                  S5        U(       d  GM,  U R                  SUS    35        GMF     SSS5        U
(       a  U(       a  U R%                  5         U R                  S5        gs  sn	nf ! , (       d  f       ND= f)a~  Helper function to represent a function call.

- func_name, args, and kwargs should all be pretty obvious.
- If split_lines, we'll force one-argument-per-line; otherwise we'll place
  calls that fit on a single line (and split otherwise).
- arg_slices is a mapping from pos-idx or keyword to (start_idx, end_idx)
  of the Conjecture buffer, by which we can look up comments to add.
)zlambda:zlambda ()arg[]c              3   2   >#    U  H  u  pUT;   v   M     g 7fr5   rN   )rV   rW   _r   s      r)   rX   2RepresentationPrinter.repr_call.<locals>.<genexpr>  s     !EHDA!x-Hs   TNr   F)r   r       r   r   r   r   r   =r|   z
<symbolic>r     # )rC   str
startswithr   r   ro   r   rq   ru   anyr   re   r   rp   r   r]   r.   r   r   r   getr   r!   r   )r7   r   r   r   r   r   r   r   ir   all_argslabelr   r   sentryr   s                   @r)   r   RepresentationPrinter.repr_call  s   & )S)))) 677I;a(I		) 2;4AtA3a[!$AD((%2
;=#))+IE(((R7M7M-M#'#6#6r#:B"? , c!EH!EEEK &'Ajjoo'AG&*&@&@A#KKd///5KQ

A!)KZZqs"Z5!*8!4:EAv/		/2KKM*222NN!34''//IIqk* U+**..uQx8$IIl+KKN!a%#h-"7IIcN5IIU1XJ/0- "5 60 KKM		#_ B* 65s   LD3L?L
L')ru   rZ   r_   r^   rh   rc   ra   rd   rp   r\   r[   rR   r]   rf   rq   re   rg   r5   r%   N)r   )r   r   r   )r   r   )#rF   rG   rH   rI   __doc__r   r   r8   rJ   rL   r!   r   r   r   r   r   r   rK   r   r   r   r   r   r	   r   tupler   r   r.   r
   dictr   r   r   rM   rN   r0   r)   r   r      s`    %)8= -1	8=T!8= .)	8=
 
8=t 49 V& VD VT Vp-' ' ''S '4 '( 'S 'Y/?%@ ' ' <>77%(7697	#	$7 7"## # #d #  T hqk ic1ftT8Q.R &# & )-"I"I "I 	"I
 v"I S&[!"I %"I 
"IT $((,&*"'HH vH S&[!	H D[H %H tH  H 
H Hr0   c                   *    \ rS rSrS\S\S\4S jrSrg)	Printablei  streamr]   r%   c                     [         er5   )NotImplementedErrorr7   r  r]   s      r)   rR   Printable.output  s    !!r0   rN   N)rF   rG   rH   rI   r   rK   rR   rM   rN   r0   r)   r  r    s    "Z "s "s "r0   r  c                   J    \ rS rSrSS jrS\S\S\4S jrS\S	\SS4S
 jr	Sr
g)r   i  r%   Nc                      / U l         SU l        g r   objsr   r>   s    r)   r8   Text.__init__  s    !	
r0   r  r]   c                 f    U R                    H  nUR                  U5        M     X R                  -   $ r5   )r
  r   r   )r7   r  r]   r"   s       r)   rR   Text.output  s)    99CLL jj((r0   r"   r   c                 d    U R                   R                  U5        U =R                  U-  sl        g r5   )r
  r   r   )r7   r"   r   s      r)   r   Text.add  s"    		

e
r0   r	  r   )rF   rG   rH   rI   r8   r   rK   rR   r   r   rM   rN   r0   r)   r   r     s;    )Z )s )s )
s 3 4 r0   r   c                   D    \ rS rSrS\S\S\SS4S jrS\S	\S\4S
 jr	Sr
g)r   i  r   r   r!   r%   Nc                     Xl         X l        X0l        UR                  U l        UR                  S   U l        U R
                  R                  R                  U 5        g )Nr   )r"   r   r!   rd   ra   r   r   r   )r7   r   r   r!   s       r)   r8   Breakable.__init__   sI    
!--''+


$$T*r0   r  r]   c                    U R                   R                  R                  5         U R                   R                  (       a-  UR	                  SSU R
                  -  -   5        U R
                  $ U R                   R                  (       d/  U R                  R                  R                  U R                   5        UR	                  U R                  5        X R                  -   $ )Nr   r   )r   r   r   r   r   rd   r!   rc   r   r"   r   r  s      r)   rR   Breakable.output(  s    

%%'::  LLd&6&6 667###zz$$KK##**4::6TXXjj((r0   )r   rd   r"   r!   r   )rF   rG   rH   rI   r   rK   r   r8   r   rR   rM   rN   r0   r)   r   r     s>    +C + +5J +t +)Z )s )s )r0   r   c                   &    \ rS rSrS\SS4S jrSrg)r`   i3  r   r%   Nc                 <    Xl         [        5       U l        SU l        g )NF)r   r   r   r   )r7   r   s     r)   r8   Group.__init__4  s    
,1G %r0   )r   r   r   )rF   rG   rH   rI   rK   r8   rM   rN   r0   r)   r`   r`   3  s    &c &d &r0   r`   c                   ^    \ rS rSrS\SS4S jrS\SS4S jrS\S-  4S jrS\SS4S	 jrS
r	g)rb   i:  groupsr%   Nc                 F    / U l         U H  nU R                  U5        M     g r5   )queuer   )r7   r  r   s      r)   r8   GroupQueue.__init__;  s    (*
EHHUO r0   r   c                    UR                   nU[        U R                  5      S-
  :  a9  U R                  R                  / 5        U[        U R                  5      S-
  :  a  M9  U R                  U   R                  U5        g )Nr|   )r   r   r  r   )r7   r   r   s      r)   r   GroupQueue.enq@  s`    c$**o))JJb! c$**o))

5  'r0   c                     U R                    HU  n[        [        U5      5       H%  u  p#UR                  (       d  M  X	 SUl        Us  s  $    U H
  nSUl        M     US S 2	 MW     g )NT)r  r   reversedr   r   )r7   re   r   r   s       r)   r   GroupQueue.deqF  sc    ZZE'8
###
'+E$ L	 9
 #'  a   r0   c                 v     U R                   UR                     R                  U5        g ! [         a     g f = fr5   )r  r   r   
ValueError)r7   r   s     r)   r   GroupQueue.removeR  s4    	JJu{{#**51 		s   (+ 
88)r  )
rF   rG   rH   rI   r`   r8   r   r   r   rM   rN   r0   r)   rb   rb   :  sK     $ 
( (4 (
UT\ 
E d r0   rb   startendbasetypec                 r   ^ ^^ S[         [           [        [           -  S[        S[        SS4UUU 4S jjnU$ )zwFactory that returns a pprint function useful for sequences.

Used by the default pprint for tuples, dicts, and lists.
r"   r   r,   r%   Nc                 V  > [        U 5      nTb?  UTLa:  UR                  TR                  :w  a   UR                  UR                  U 5      5      $ U(       a  UR                  T	S-   T-   5      $ [        T	5      nUR	                  UT	T5         UR                  U 5       H>  u  pVU(       a!  UR                  S5        UR                  5         UR                  U5        M@     [        U 5      S:X  a#  [        U 5      [        L a  UR                  S5        S S S 5        g ! , (       d  f       g = f)Nr   r   r|   )	r<   __repr__r   r   r   r   r   r!   r   )
r"   r   r,   typstepr   r   r'  r&  r%  s
          r)   inner$_seq_pprinter_factory.<locals>.inner_  s     3i 8# 1 11 66#,,s+,,66%%-#-..5zWWT5#&,,s+FF3KKKM	 ,
 3x1}ce!3s '&&s   BD
D()r   rJ   ro   r   rL   r%  r&  r'  r-  s   ``` r)   _seq_pprinter_factoryr0  Y  sA    6]T&\).CLP	 2 Lr0   r   c                 b    [        U SU R                  5      n[        U[        5      (       d   eU$ )NrH   )r*   rF   rC   r   )r   
class_names     r)   get_class_namer3  {  s-    sNCLLAJj#&&&&r0   c                 r   ^ ^^ S[         [           [        [           -  S[        S[        SS4UUU 4S jjnU$ )zFFactory that returns a pprint function useful for sets and
frozensets.r"   r   r,   r%   Nc                   > [        U 5      nTb?  UTLa:  UR                  TR                  :w  a   UR                  UR                  U 5      5      $ U(       a  UR                  T
S-   T	-   5      $ U (       d  UR                  [        T5      S-   5        g [	        T
5      nUR                  UT
T	5         U nUR                  (       a  [	        U 5      UR                  :  d   [        U 5      nUR                  U5       H>  u  pgU(       a!  UR                  S5        UR                  5         UR                  U5        M@     S S S 5        g ! [         a     Nhf = f! , (       d  f       g = f)Nr   z()r   )r<   r*  r   r3  r   r   r\   sortedr(   r   r   r!   )r"   r   r,   r+  r,  r   r   r   r'  r&  r%  s           r)   r-  $_set_pprinter_factory.<locals>.inner  s    
 3i 8# 1 11 66#,,s+,,66%%-#-..FF>(+d23u:Duc**-((SX9I9I-I &s  ll51FCsHHQK	 2 +* %  +*s1   0-EE)AE
EEEE
E#)rt   r   	frozensetr   rL   r/  s   ``` r)   _set_pprinter_factoryr9    sF    " X	#&"  "  "  
	"  " H Lr0   c                    ^ ^^ S[         [        [        4   S[        S[        SS4UUU 4S jjnST < ST< ST< S	3Ul        U$ )
z\Factory that returns a pprint function used by the default pprint of
dicts and dict proxies.r"   r   r,   r%   Nc                   > [        U 5      nTb?  UTLa:  UR                  TR                  :w  a   UR                  UR                  U 5      5      $ U(       a  UR                  S5      $ UR                  STT5         [        R
                  " 5          [        R                  " S[        5        UR                  U 5       Hb  u  pEU(       a!  UR                  S5        UR                  5         UR                  U5        UR                  S5        UR                  X   5        Md     S S S 5        S S S 5        g ! , (       d  f       N= f! , (       d  f       g = f)N{...}r|   ignorer   : )r<   r*  r   r   warningscatch_warningssimplefilterBytesWarningr   r   r!   )	r"   r   r,   r+  r   r   r'  r&  r%  s	         r)   r-  %_dict_pprinter_factory.<locals>.inner  s    3i 8# 1 11 66#,,s+,,66'?"GGAuc" ##%!!(L9LL-FF3KKKMt" . &	 #" &%	 #"s%   :EBD4#E4
E	>E
Ez_dict_pprinter_factory(z, r   )r   rJ   r   rL   rF   r/  s   ``` r)   _dict_pprinter_factoryrD    sW    #4' #,A #$ #SW # #8 /uir#8,aPENLr0   r   c                    UR                  SSS5         UR                  U R                  5        UR                  S5        UR	                  5         UR                  U R
                  5        SSS5        g! , (       d  f       g= f)zThe pprint for the super type.   z<super: >r   N)r   r!   __thisclass__r   r   __self__r"   r   r,   s      r)   _super_pprintrK    sT    	
J	$	""#	s			 
%	$	$s   AA55
Bc                    UR                  S5        [        U R                  5      nUSS S;   a  USS nSnOSnXCR                  SS5      -   nUR                  U5        U R                  (       a  UR                  S	5        UR                  5         S
nS HV  nU R                  [        [        US5      -  (       d  M(  U(       a  UR                  S5        UR                  SU-   5        SnMX     UR                  S5        g)z4The pprint function for regular expression patterns.zre.compile(Nr|   uUurrz\\\r   F)TEMPLATE
IGNORECASELOCALE	MULTILINEDOTALLUNICODEVERBOSEDEBUGr   |zre.Tr   )r   r   patternreplaceflagsr   r'   re)r"   r   r,   rZ  prefixdone_oneflags          r)   _re_pattern_pprintra    s    FF=3;;Gr{d!"+vt44GFF7O
yy	s		
D yy72tQ///FF3Kut|$	
 FF3Kr0   c                 d   [        U 5      R                  [         R                  :w  a  [        XU5        g[        U SS5      n U R                  nUS;   a  UR                  U5        gUR                  US-   U-   5        g! [
         a&    U R                  n[        U[        5      (       d  Sn N_f = f)z!The pprint for classes and types.NrG   z<unknown type>)N__builtin__builtins
exceptions.)
r<   r*  r   r*   rH   r(   rF   rC   r   r   )r"   r   r,   modr   s        r)   _type_pprintrh    s     CyT]]*SU#
\4
0C$ ==	t	sSy4   $||$$$#D$s   A? ?-B/.B/c                     [        U 5      n[        UR                  5       5       H-  u  pEU(       a  UR                  5         UR	                  U5        M/     g)z9A pprint that just redirects to the normal repr function.N)r   r   
splitlinesr   r   )r"   r   r,   rR   r   output_lines         r)   r   r     s@     #YF%f&7&7&9:HHJ	{ ;r0   fieldsc                    [        U R                  5      nU(       a  UR                  U S35      $ UR                  SUS-   S5         [	        U5       Hi  u  pVU(       a!  UR                  S5        UR                  5         UR                  U5        UR                  S5        UR                  [        X5      5        Mk     S S S 5        g ! , (       d  f       g = f)N(...)r|   r   r   r   r   )r3  rz   r   r   r   r   r!   r'   )r"   r   r,   rl  r   r   fields          r)   r   r   !  s     #--(Dvven%%	
D3J	$#F+JCsFF5MFF3KHHWS() , 
%	$	$s   A9C		
Cr   r   c                     UR                  U5      =n(       a/  X0R                  ;   a   X0R                  ;  a  U R                  U   U4$ g)zHLook up a comment for a slice, if not already printed at a higher level.N)r   rq   ru   )r   r   r   r   s       r)   _get_slice_commentrq  1  sH     nnS!!!r-=-='=((($$R("--r0   c                 @   ^  S[         S[        S[        SS4U 4S jjnU$ )z;Pretty printer for tuples that shows sub-argument comments.r"   r   r,   r%   Nc                   >^^ U(       a  TR                  S5      $ UU4S jm[        U4S j[        [        U 5      5       5       5      nTR	                  SSSS9   TR                  U 5       H  u  pEU(       a  TR                  5       OU(       a  TR                  5       OS   TR                  U5        U(       d!  US-   [        U 5      :  d  [        U 5      S:X  a  TR                  S	5        T" U5      =n(       d  M  TR                  R                  US   5        TR                  S
US    35        M     S S S 5        U(       a  U (       a  TR                  5         TR                  S5        g ! , (       d  f       N>= f)Nrn  c                 &   > [        TTSU  S35      $ )Nr   r   rq  )r   r   r   s    r)   <lambda>0_tuple_pprinter.<locals>.inner.<locals>.<lambda>D  s    *1jD1+Fr0   c              3   4   >#    U  H  nT" U5      v   M     g 7fr5   rN   )rV   r   r   s     r)   rX   1_tuple_pprinter.<locals>.inner.<locals>.<genexpr>E  s     ;?a3q66?   r   r   r   r   r|   r   r   r   r   )r   r   ranger   r   r   r   r   r!   ru   r   )	r"   r   r,   has_commentsr   r   r   r   r   s	    `     @r)   r-  _tuple_pprinter.<locals>.inner@  s	   66'?"F;5S?;;WWACrW2,,s+*
#437SX#5SQFF3KH$5$''++E!H5FFT%(,- , 3 CHHJ	s 32s   BE.=9E..
E<)r   r   rL   )r   r-  s   ` r)   r    r    =  s,    5 2 4 D ( Lr0   mappingc                 D   ^ ^ S[         S[        S[        SS4U U4S jjnU$ )zGPretty printer for fixed_dictionaries that shows sub-argument comments.r"   r   r,   r%   Nc                 `  >^ ^^ U(       a  TR                  S5      $ U	U4S jm[        [        R                  U 4S j/ T
QT Q 5       5      5      n[	        U4S jU 5       5      nTR                  SSSS9   TR                  U5       H  u  pVU(       a  TR                  5       OU(       a  TR                  5       OS   TR                  U5        TR                  S	5        TR                  T U   5        U(       d  US
-   [        U5      :  a  TR                  S5        T" U5      =n(       d  M  TR                  R                  US
   5        TR                  SUS    35        M     S S S 5        U(       a  T (       a  TR                  5         TR                  S5        g ! , (       d  f       N>= f)Nr<  c                    > [        TTU 5      $ r5   ru  )rW   r   r   s    r)   rv  4_fixeddict_pprinter.<locals>.inner.<locals>.<lambda>a  s    *1j!<r0   c              3   6   >#    U  H  oT;   d  M
  Uv   M     g 7fr5   rN   )rV   rW   r"   s     r)   rX   5_fixeddict_pprinter.<locals>.inner.<locals>.<genexpr>c  s     !J-=c!!-=s   		c              3   4   >#    U  H  nT" U5      v   M     g 7fr5   rN   )rV   rW   r   s     r)   rX   r  d  s     04a3q664rz  r   {r   r   r>  r|   r   r   r   })r   ro   r   fromkeysr   r   r   r   r   r!   r   ru   r   )r"   r   r,   keysr|  r   r   r   r   r   r~  s   ``      @r)   r-  "_fixeddict_pprinter.<locals>.inner]  s6   66'?"<DMM!J-=w-=-=!JJK0400WWACrW2LL.*
#4tS"37SY#6FF3KH$5$''++E!H5FFT%(,- / 3 CHHJ	s 32s   6B4F.9F
F-)r   r   rL   )r   r~  r-  s   `` r)   r   r   W  s1    4 1 $ 4  0 Lr0   c                 >    SSK Jn  UR                  U" U 5      5        g)z4Base pprint for all functions and builtin functions.r   )get_pretty_function_descriptionN)hypothesis.internal.reflectionr  r   )r"   r   r,   r  s       r)   _function_pprintr  x  s     OFF*3/0r0   c                    [        U R                  SU R                  R                  5      nU R                  R                  S;  a  U R                  R                   SU 3n[	        U5      S-   nUR                  XCS-   S5         [        [        U SS5      5       H>  u  pVU(       a!  UR                  S	5        UR                  5         UR                  U5        M@     S
S
S
5        g
! , (       d  f       g
= f)zBase pprint for all exceptions.rH   )re  rd  rf  r|   r   r   r   rN   r   N)
r'   rz   rF   rG   r   r   r   r   r   r!   )r"   r   r,   r   r,  r   args          r)   _exception_pprintr    s     3==.#--2H2HID
}}'AA--**+1TF3t9q=D	
cz3	'!'#vr":;HCsHHSM	 < 
(	'	's   AC&&
C4c                     [        U 5      S:  a  UR                  [        U 5      5        g [        U 5      SS-  :  a  UR                  U S 5        g UR                  U S 5        g )Ni ʚ;
   i  z#_dz#_x)absr   r   rJ  s      r)   _repr_integerr    sP    
3x-	tCy	SBG		#c 	
#cr0   c           	         [        U 5      (       a  [        R                  " S[        U 5      5      [        R                  " S[	        S5      5      :w  aG  [        [        R                  " S[        R                  " SU 5      5      6 nUR                  SU S35      $ [        SU 5      S:X  a  UR                  S	5      $ UR                  [        U 5      5        g )
Nz!dnanQdz$struct.unpack('d', struct.pack('Q', z))[0]g      ?g      z-nan)
r   structpackr  floathexunpackr   r   r   )r"   r   r,   shows       r)   _repr_float_counting_nansr    s     Szz;;tSX&&++dE%L*IIc6;;sC+@ABD66@eLMMc34'66&>!FF49r0   r   r   [r   r  r  zfrozenset({z})rm   rn   type_module	type_namefuncc                 H    X4n[         R                  U5      nU[         U'   U$ )znAdd a pretty printer for a type specified by the module and name of a
type rather than the type object itself.)rn   r   )r  r  r  r   oldfuncs        r)   for_type_by_namer    s,    
 
"C&**3/G$(S!Nr0   Trl   c                    U R                   R                  nUR                  [        U5      S-   US-   S5         U(       a  UR	                  S5        OVUR                  U R                  5        UR	                  S5        UR                  5         UR                  [        U 5      5        S S S 5        g ! , (       d  f       g = f)Nr|   r   r   r   r   )	rz   rF   r   r   r   r!   default_factoryr   r   r"   r   r,   r   s       r)   _defaultdict_pprintr    s     ==!!D	
TQs
C	0FF5MHHS(()FF3KKKMHHT#Y 
1	0	0s   A0B22
C c                 8   U R                   R                  nUR                  [        U5      S-   US-   S5         U(       a  UR	                  S5        O/U (       a(  UR                  [        U R                  5       5      5        S S S 5        g ! , (       d  f       g = fNr|   r   r   r   )rz   rF   r   r   r   r!   ro   r   r  s       r)   _ordereddict_pprintr    sc     ==!!D	
TQs
C	0FF5MHHT#))+&'	 
1	0	0s   A	B
Bc                    U R                   R                  nUR                  [        U5      S-   US-   S5         U(       a  UR	                  S5        OUR                  [        U 5      5        S S S 5        g ! , (       d  f       g = fr  )rz   rF   r   r   r   r!   ro   r  s       r)   _deque_pprintr    sW    ==!!D	
TQs
C	0FF5MHHT#Y	 
1	0	0s   4A66
Bc                    U R                   R                  nUR                  [        U5      S-   US-   S5         U(       a  UR	                  S5        O!U (       a  UR                  [        U 5      5        S S S 5        g ! , (       d  f       g = fr  )rz   rF   r   r   r   r!   r   r  s       r)   _counter_pprintr    s\     ==!!D	
TQs
C	0FF5MHHT#Y	 
1	0	0s   ;A==
Bc                     UR                  S5         UR                  5         [        XU5        S S S 5        UR                  5         g ! , (       d  f       N= f)Nr   )r   r   r   rJ  s      r)   _repr_dataframer    s:     
!	
SU# 
 HHJ 
s   A
Ac                 8  ^ ^ [        [        T 5      5      m[        T [        5      (       aO  UR	                  SR                  U U4S j[        T 5       5       5      =(       d    T ST R                  < S35        g UR	                  T ST R                   35        g )Nz | c              3   Z   >#    U  H   oT-  U:X  d  M  T S UR                    3v   M"     g7f)rf  N)r   )rV   r   r"   tnames     r)   rX   _repr_enum.<locals>.<genexpr>  s+     NIqSA*%!&&*Is   ++r   r   rf  )r3  r<   rC   r   r   joinr3   r   )r"   r   r,   r  s   `  @r)   
_repr_enumr    sv    49%E#t	JJNDINN )#))a(	

 	
%#(($%r0   c                   "    \ rS rSrS\4S jrSrg)	_ReprDotsi  r%   c                     g)Nr   rN   r>   s    r)   r*  _ReprDots.__repr__  s    r0   rN   N)rF   rG   rH   rI   r   r*  rM   rN   r0   r)   r  r    s    # r0   r  c                     U R                   U R                  pCU(       a  [        5       40 pCUR                  [	        [        U 5      5      U R                  /UQ7U5        g r5   )r   keywordsr  r   r!   r<   r  )r"   r   r,   r   kws        r)   _repr_partialr    sD    xx"K>2bKKtCy!CHH#4t#4b9r0   collectionsr   r   ordereddictr   r   zpandas.core.frame	DataFrameenumr   	functoolsr   r5   )lr   r   datetimer]  r  ri   typesr?  r  r   r   r   r   collections.abcr   r   r	   r
   
contextlibr   r   r  r   r   r  r   ior   r   mathr   r   typingr   r   r   r   r   hypothesis.controlr   r   rL   r   __annotations__r   r   r   rK   r   __all__rJ   r*   r!   r   r   r  r   r   r`   rb   r<   r0  r3  r9  rD  rK  Patternra  rh  r   r   rq  r    r   FunctionTypeBuiltinFunctionType
MethodTyper  BaseExceptionr  r  r  r  ro   rt   r8  super	timedeltaslicer{  bytesrm   rn   r  r  mapr=   EllipsisNotImplementedrl   r  r  r  r  r  r  r  r  rN   r0   r)   <module>r     s  4l   	  
   @ @ C C /   #   C C/CL!)30G*NPT*T!U Y US%S/12
I 2
v 
S 
3: 
 
 */  $ 3 O OH HV" "
9 )	 )(&I & > 3 $ CV DV  ***$(L**\ ;?###$(L4$7##Ls 4 T d BJJ +@  RV B!d6l !'< !T !d !2f !6 t  *	*)*26*@H*	* 			 
	 3c3h 4'		
 /B 4#s(^ B1			e77	7%:J:J	J11 1 
	1	09=	 	s 	4 	T 	d 				(	15			44	$4 4 
 c51	4
 	
S$
/4 	
 c4
04 	sC	-4 $]D)D4 
=4 JJ"4 	,4 
(4 
/4 
&4 |4  !4" $#4$ 
<	<	<)4d//0 0 HJ $uS#X0CCD I!$,?4 8<}}T4.9:L8 d3 334 
 	VV^	$ )> GK 	 (	VV^	$()>(GK(	( uV}  )>  t  PT   	 2 ;? 	 	)26	&D &2 &4 &D & 
:ws| :(= :d :t : /B C /B C /B C  7 	? ; $k? C  , i 7r0   