(path: os.PathLike, platform: str)
| 119 | |
| 120 | |
| 121 | def 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 |
no test coverage detected