Skip to content

Commit 499c4b2

Browse files
Merge pull request #396 from riscv-software-src/dev/kbroch/fix-py-fstring-double-quotes
convert f-string termination to single-quote to fix syntax errors
2 parents 5fda047 + 2a3cc1f commit 499c4b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/yaml_resolver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def resolve(rel_path : str | Path, arch_root : str | Path, do_checks: bool) -> d
214214
exit(1)
215215
fn_name = Path(rel_path).stem
216216
if do_checks and (fn_name != unresolved_arch_data["name"]):
217-
print(f"ERROR: 'name' key ({unresolved_arch_data["name"]}) must match filename ({fn_name} in {arch_root}/{rel_path}", file=sys.stderr)
217+
print(f"ERROR: 'name' key ({unresolved_arch_data['name']}) must match filename ({fn_name} in {arch_root}/{rel_path}", file=sys.stderr)
218218
exit(1)
219219
resolved_objs[str(rel_path)] = _resolve(unresolved_arch_data, [], rel_path, unresolved_arch_data, arch_root, do_checks)
220220
return resolved_objs[str(rel_path)]
@@ -266,11 +266,11 @@ def _resolve(obj, obj_path, obj_file_path, doc_obj, arch_root, do_checks):
266266

267267
if "$parent_of" in ref_obj:
268268
if isinstance(ref_obj["$parent_of"], list):
269-
ref_obj["$parent_of"].append(f"{obj_file_path}#/{"/".join(obj_path)}")
269+
ref_obj["$parent_of"].append(f"{obj_file_path}#/{'/'.join(obj_path)}")
270270
else:
271-
ref_obj["$parent_of"] = [ref_obj["$parent_of"], f"{obj_file_path}#/{"/".join(obj_path)}"]
271+
ref_obj["$parent_of"] = [ref_obj["$parent_of"], f"{obj_file_path}#/{'/'.join(obj_path)}"]
272272
else:
273-
ref_obj["$parent_of"] = f"{obj_file_path}#/{"/".join(obj_path)}"
273+
ref_obj["$parent_of"] = f"{obj_file_path}#/{'/'.join(obj_path)}"
274274

275275
del obj["$inherits"]
276276

0 commit comments

Comments
 (0)