MCPcopy Index your code
hub / github.com/pydata/xarray / _mapping_section

Function _mapping_section

xarray/core/formatting_html.py:208–229  ·  view source on GitHub ↗
(
    mapping,
    name,
    details_func,
    max_items_collapse,
    expand_option_name,
    enabled=True,
    **kwargs,
)

Source from the content-addressed store, hash-verified

206
207
208def _mapping_section(
209 mapping,
210 name,
211 details_func,
212 max_items_collapse,
213 expand_option_name,
214 enabled=True,
215 **kwargs,
216) -> str:
217 n_items = len(mapping)
218 expanded = max_items_collapse is None or _get_boolean_with_default(
219 expand_option_name, n_items < max_items_collapse
220 )
221 collapsed = not expanded
222
223 return collapsible_section(
224 f"{name}:",
225 details=details_func(mapping, **kwargs),
226 n_items=n_items,
227 enabled=enabled,
228 collapsed=collapsed,
229 )
230
231
232def dim_section(obj) -> str:

Callers

nothing calls this directly

Calls 2

collapsible_sectionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…