Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
jupyter.cpython-313.pyc28 linesDownload Raw Back to __pycache__
1�

2�j�����SSKJrJrJrJrJrJr \(aSSKJr SSK	J3r4 SSKJr SSK
Jr \(aSSKJr Sr"SS	5r"S5S5rS\\S
\4SjrS\\S\S
S4SjrS\S\S
S4Sjrg)�)�
TYPE_CHECKING�Any�Dict�Iterable�List�Sequence)�ConsoleRenderable�)�get_console)�Segment)�DEFAULT_TERMINAL_THEMEz�<pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace">{code}</pre>6c7�^�\rSrSrSrS\S\SS4SjrS\\S	\\S8\S\	\\44Sjr9Srg)
�JupyterRenderable�z)A shim to write html to Jupyter notebook.�html�text�returnNc��XlX lg)N�rr)�selfrrs   �RD:\code\apps\devtools\python\user_packages\Python313\site-packages\rich/jupyter.py�__init__�JupyterRenderable.__init__s���	��	��include�exclude�kwargsc��URURS.nU(a+UR5VVs0sHupVXQ;dMXV_M nnnU(a+UR5VVs0sHupVXR;dMXV_M nnnU$s snnfs snnf�N)z10text/plainz	text/html)rr�items)rrrr�data�k�vs       r�_repr_mimebundle_�#JupyterRenderable._repr_mimebundle_ss��#�i�i�d�i�i�@���'+�z�z�|�D�|�V�a�q�|�D�A�D�|�D�D��'+�z�z�|�H�|�V�a�q�7G�D�A�D�|�D�H����E��Hs�B�B�&B�5Br)�__name__�11__module__�__qualname__�__firstlineno__�__doc__�strrrrrr$�__static_attributes__�rrrrsT��3��S���������}��/7��}��HK��	
�c�3�h��rrc�P�\rSrSrSrSrSSS\\S\\S\S	\	\\4412S13jr14Srg)�JupyterMixin�$z@Add to an Rich renderable to make it render in Jupyter notebook.r-rr	rrrrc��[5n[URXR55n[	U5nURU5nXvS.nU(a+UR
5V	V15s0sHup�X�;dMX�_M nn	n16U(a+UR
5V	V17s0sHup�X�;dMX�_M nn	n18U$s sn19n	fs sn20n	fr)r�list�render�options�_render_segments�_render_bufferr )rrrr�console�segmentsrrr!r"r#s           rr$�JupyterMixin._repr_mimebundle_)s����-������t�_�_�=�>����)���%�%�h�/��"�6���'+�z�z�|�D�|�V�a�q�|�D�A�D�|�D�D��'+�z�z�|�H�|�V�a�q�7G�D�A�D�|�D�H����E��Hs�)B5�8B5�B;�*B;N)r&r'r(r)r*�	__slots__rr+rrr$r,r-rrr/r/$sM��J��I��!���#����#����	�2122�c�3�h��rr/r8rc��S[S[4Sjn/nURn[n[R"U5HmupVnU(aMU"U5nU(aGURU5nU(a	SUSUS3OUnUR(aSURSUS	3nU"U5 Mo S23RU5n	[RU	S9n24U25$)Nrrc�f�URSS5RSS5RSS5$)zEscape html.�&z&amp;�<z&lt;�>z&gt;)�replace)rs r�escape� _render_segments.<locals>.escape<s-���|�|�C��)�1�1�#�v�>�F�F�s�F�S�Srz
<span style="z">z</span>z	<a href="z" target="_blank">z</a>�)�code)26r+�appendr
r�simplify�get_html_style�link�join�JUPYTER_HTML_FORMAT�format)r8rA�	fragments�append_fragment�themer�style�control�rulerDrs           rr5r5;s���T�S�T�S�T��I��&�&�O�"�E� '� 0� 0�� :���W����d�|����'�'��.�D�<@�]�4�&��4�&��8�d�D��z�z�"�5�:�:�,�.@���d�K�����!;��7�7�9��D��%�%�4�%�0�D��KrrNc�n�[U5n[X!5nSSKJn U"U5 g![a gf=f)zRender segments to Jupyter.r)�displayN)r5r�IPython.displayrS�ModuleNotFoundError)r8rr�jupyter_renderable�ipython_displays     rrSrSTs<���H�%�D�*�4�6��
�>��*�+���
�	
�
�s�'�274�4�argsrc�:�[5nUR"U0UD6$)zProxy for Console print.)r�print)rXrr7s   rrZrZbs���m�G��=�=�$�)�&�)�)r)�typingrrrrrr�rich.consoler	rCr�segmentr�terminal_themer
rJrr/r+r5rSrZr-rr�<module>r_s���E�E��.���2��.���28��$��.�x��0��S��2
�h�w�'�
�s�
�t�
�*��*��*��*r
codekingpro/portable-devtools · Team Ai