MCPcopy
hub / github.com/pydata/xarray / __item

Method __item

xarray/core/datatree_render.py:224–235  ·  view source on GitHub ↗
(
        node: DataTree | str, continues: tuple[bool, ...], style: AbstractStyle
    )

Source from the content-addressed store, hash-verified

222
223 @staticmethod
224 def __item(
225 node: DataTree | str, continues: tuple[bool, ...], style: AbstractStyle
226 ) -> Row:
227 if not continues:
228 return Row("", "", node)
229 else:
230 items = [style.vertical if cont else style.empty for cont in continues]
231 indent = "".join(items[:-1])
232 branch = style.cont if continues[-1] else style.end
233 pre = indent + branch
234 fill = "".join(items)
235 return Row(pre, fill, node)
236
237 def __str__(self) -> str:
238 return str(self.node)

Callers 1

__nextMethod · 0.80

Calls 2

RowClass · 0.85
joinMethod · 0.45

Tested by

no test coverage detected