MCPcopy Create free account
hub / github.com/Walter0807/MotionBERT / Loader

Class Loader

lib/utils/tools.py:19–30  ·  view source on GitHub ↗

YAML Loader with `!include` constructor.

Source from the content-addressed store, hash-verified

17 f.write(log + "\n")
18
19class Loader(yaml.SafeLoader):
20 """YAML Loader with `!include` constructor."""
21
22 def __init__(self, stream: IO) -> None:
23 """Initialise Loader."""
24
25 try:
26 self._root = os.path.split(stream.name)[0]
27 except AttributeError:
28 self._root = os.path.curdir
29
30 super().__init__(stream)
31
32def construct_include(loader: Loader, node: yaml.Node) -> Any:
33 """Include file referenced at node."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected