Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions google/genai/tunings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3844,9 +3844,9 @@ def _get_ipython_shell_name() -> Union[str, Any]:
import sys

if 'IPython' in sys.modules:
from IPython import get_ipython
from IPython import get_ipython # type: ignore[attr-defined]

return get_ipython().__class__.__name__
return get_ipython().__class__.__name__ # type: ignore[no-untyped-call]
return ''

@staticmethod
Expand Down Expand Up @@ -3964,10 +3964,10 @@ def _display_link(
</script>
"""

from IPython.display import display
from IPython.display import HTML
from IPython.display import display # type: ignore[attr-defined]
from IPython.display import HTML # type: ignore[attr-defined]

display(HTML(html))
display(HTML(html)) # type: ignore[no-untyped-call]

@staticmethod
def display_experiment_button(experiment: str, project: str) -> None:
Expand Down
10 changes: 5 additions & 5 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9309,10 +9309,10 @@ def show(self) -> None:
try:
from IPython import display as IPython_display
except ImportError:
IPython_display = None
IPython_display = None # type: ignore[assignment]

if IPython_display:
IPython_display.display(self._pil_image)
IPython_display.display(self._pil_image) # type: ignore[no-untyped-call]
else:
img = self._pil_image
if img is not None:
Expand Down Expand Up @@ -11726,11 +11726,11 @@ def show(self) -> None:
try:
from IPython import display as IPython_display
except ImportError:
IPython_display = None
IPython_display = None # type: ignore[assignment]

if IPython_display:
IPython_display.display(
IPython_display.Video(
IPython_display.display( # type: ignore[no-untyped-call]
IPython_display.Video( # type: ignore[no-untyped-call]
data=self.video_bytes, mimetype=mime_type, embed=True
)
)
Expand Down
Loading