MCPcopy Create free account
hub / github.com/conda/constructor / parse

Function parse

constructor/construct.py:121–136  ·  view source on GitHub ↗
(path: os.PathLike, platform: str)

Source from the content-addressed store, hash-verified

119
120
121def parse(path: os.PathLike, platform: str):
122 try:
123 res = yaml.load(render(path, platform))
124 except YamlParsingError as e:
125 sys.exit(e.error_msg())
126
127 try:
128 res["version"] = str(res["version"])
129 except KeyError:
130 pass
131
132 for key in list(res):
133 if res[key] is None:
134 del res[key]
135
136 return res
137
138
139# this is actually not an error, therefore the naming is okay

Callers 1

calculate_install_dirFunction · 0.85

Calls 2

renderFunction · 0.85
error_msgMethod · 0.80

Tested by

no test coverage detected