U
    “öhd  ã                   @  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                   @  s<   e Zd ZdZejdddœdd„ƒZejdddœdd	„ƒZd
S )Ú
IPythonEnvzCAbstract base class that provides a wrapper around IPython methods.r   ÚNone)ÚxÚreturnc                 C  s   dS )z.Wrapper around IPython.core.display.display().N© ©Úselfr   r   r   úL/tmp/pip-unpacked-wheel-doshhd5e/google/generativeai/notebook/ipython_env.pyÚdisplay    s    zIPythonEnv.displayÚstrc                 C  s   dS )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$   s    zIPythonEnv.display_htmlN)Ú__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   