Skip to content
Merged
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
2 changes: 1 addition & 1 deletion xarray/core/formatting_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def summarize_variable(name, var, is_index=False, dtype=None, preview=None):
cssclass_idx = " class='xr-has-index'" if is_index else ""
dims_str = f"({', '.join(escape(dim) for dim in var.dims)})"
name = escape(name)
dtype = dtype or var.dtype
dtype = dtype or escape(str(var.dtype))

# "unique" ids required to expand/collapse subsections
attrs_id = "attrs-" + str(uuid.uuid4())
Expand Down
2 changes: 2 additions & 0 deletions xarray/tests/test_formatting_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,5 @@ def test_repr_of_dataset(dataset):
assert (
formatted.count("class='xr-section-summary-in' type='checkbox' checked>") == 3
)
assert "<U4" in formatted
assert "<IA>" in formatted