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

Class IndexWithInlineRepr

xarray/tests/test_formatting.py:244–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 assert "CustomIndex" in normal
243
244 class IndexWithInlineRepr(CustomIndex):
245 def _repr_inline_(self, max_width: int):
246 return f"CustomIndex[{', '.join(self.names)}]"
247
248 index = IndexWithInlineRepr(coord_names)
249 inline = formatting.summarize_index(names, index, col_width=20)

Callers 1

test_index_reprMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_index_reprMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…