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

Function _render_classbody

xarray/util/generate_ops.py:299–313  ·  view source on GitHub ↗
(method_blocks: list[OpsType])

Source from the content-addressed store, hash-verified

297
298
299def _render_classbody(method_blocks: list[OpsType]) -> Iterator[str]:
300 environment = jinja2.Environment()
301
302 for method_func_pairs, template, extra in method_blocks:
303 if template:
304 for method, func in method_func_pairs:
305 yield environment.from_string(template).render(
306 method=method, func=func, **extra
307 )
308
309 yield ""
310 for method_func_pairs, *_ in method_blocks:
311 for method, func in method_func_pairs:
312 if method and func:
313 yield COPY_DOCSTRING.format(method=method, func=func)
314
315
316if __name__ == "__main__":

Callers 1

renderFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…