Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: HoloMap formatter (#1347)

Myles Scolnick12e316ae66d3
diff --git a/marimo/_output/formatters/holoviews_formatters.py b/marimo/_output/formatters/holoviews_formatters.py
index ca9990a693..5a472835f0 100644
--- a/marimo/_output/formatters/holoviews_formatters.py
+++ b/marimo/_output/formatters/holoviews_formatters.py
@@ -20,8 +20,21 @@ class HoloViewsFormatter(FormatterFactory):
@formatting.formatter(hv.core.ViewableElement)
@formatting.formatter(hv.core.Layout)
+ @formatting.formatter(hv.HoloMap)
+ @formatting.formatter(hv.DynamicMap)
+ @formatting.formatter(hv.core.spaces.HoloMap)
+ @formatting.formatter(hv.core.ndmapping.UniformNdMapping)
+ @formatting.formatter(hv.core.ndmapping.NdMapping)
def _show_chart(
- plot: hv.core.ViewableElement | hv.core.Layout,
+ plot: (
+ hv.core.ViewableElement
+ | hv.core.Layout
+ | hv.HoloMap
+ | hv.DynamicMap
+ | hv.core.spaces.HoloMap
+ | hv.core.ndmapping.UniformNdMapping
+ | hv.core.ndmapping.NdMapping
+ ),
) -> tuple[KnownMimeType, str]:
backend_output = hv.render(plot)
diff --git a/pyproject.toml b/pyproject.toml
index facd2ad944..2f79c8734d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -284,6 +284,7 @@ omit = ["marimo/_tutorials/*"]
[tool.typos.default.extend-words]
wheres = "wheres"
Ue = "Ue" # Used in one of the cell IDs
+Nd = "Nd" # Confused with And
[tool.typos.files]
extend-exclude = [