MCPcopy
hub / github.com/treeverse/dvc / get_definition_data

Method get_definition_data

dvc/render/match.py:43–59  ·  view source on GitHub ↗
(self, target_files, rev)

Source from the content-addressed store, hash-verified

41 return dict(groups)
42
43 def get_definition_data(self, target_files, rev):
44 result = {}
45 for definition_file in target_files:
46 if os.name == "nt":
47 source_file = _normpath(definition_file).replace("\\", "/")
48 else:
49 source_file = definition_file
50 file_content = (
51 self.data.get(rev, {})
52 .get("sources", {})
53 .get("data", {})
54 .get(source_file, {})
55 .get("data", {})
56 )
57 if file_content:
58 result[definition_file] = file_content
59 return result
60
61
62class RendererWithErrors(NamedTuple):

Callers 1

match_defs_renderersFunction · 0.95

Calls 3

_normpathFunction · 0.90
replaceMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected