o
    €j6h–  ã                   @  s:   d Z ddlmZ ddlZddlmZ G dd„ dejƒZdS )aD  Abstract IPythonEnv base class.

This module provides a layer of abstraction to address the following problems:
1. Sometimes the code needs to run in an environment where IPython is not
available, e.g. inside a unittest.
2. We want to limit dependencies on IPython to code that deals directly with
the notebook environment.
é    )ÚannotationsN)ÚAnyc                   @  s0   e Zd ZdZejddd„ƒZejdd	d
„ƒZdS )Ú
IPythonEnvzCAbstract base class that provides a wrapper around IPython methods.Úxr   ÚreturnÚNonec                 C  ó   dS )z.Wrapper around IPython.core.display.display().N© ©Úselfr   r	   r	   úw/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/google/generativeai/notebook/ipython_env.pyÚdisplay    ó    zIPythonEnv.displayÚstrc                 C  r   )as  Wrapper to display HTML.

        This method is equivalent to calling:
          display.display(display.HTML(x))

        display() and HTML() are combined into a single method because
        display.HTML() returns an object, which would be complicated to model with
        this abstract interface.

        Args:
          x: An HTML string to be displayed.
        Nr	   r
   r	   r	   r   Údisplay_html$   r   zIPythonEnv.display_htmlN)r   r   r   r   )r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚabcÚabstractmethodr   r   r	   r	   r	   r   r      s    r   )r   Ú
__future__r   r   Útypingr   ÚABCr   r	   r	   r	   r   Ú<module>   s
   