Skip to content
Merged
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
8 changes: 2 additions & 6 deletions rendercanvas/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import sys
import importlib
from typing import cast
import __main__ as main_module

from .core.coreutils import (
logger,
Expand Down Expand Up @@ -134,11 +133,8 @@ def backends_by_notebook():
"""Generate backend names that are appropriate for the current Jupyter session (if any)."""

# Detect Marimo: https://github.com/marimo-team/marimo/discussions/8865
try:
_ = main_module.__marimo__
yield "jupyter", "running in Marimo"
except AttributeError:
pass
if "marimo" in sys.modules and sys.modules["marimo"].running_in_notebook():
yield "jupyter", "running on Marimo"

try:
ip = get_ipython() # type: ignore
Expand Down
Loading