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

Method get

xarray/core/datatree_render.py:281–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279 """
280
281 def get() -> Iterator[str]:
282 for pre, fill, node in self:
283 if isinstance(node, str):
284 yield f"{fill}{node}"
285 continue
286 attr = (
287 attrname(node)
288 if callable(attrname)
289 else getattr(node, attrname, "")
290 )
291 if isinstance(attr, list | tuple):
292 lines = attr
293 else:
294 lines = str(attr).split("\n")
295 yield f"{pre}{lines[0]}"
296 for line in lines[1:]:
297 yield f"{fill}{line}"
298
299 return "\n".join(get())
300

Callers

nothing calls this directly

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected