Skip to content

Commit 8abc4cf

Browse files
committed
lint: run black
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 3e4c2af commit 8abc4cf

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

flow/scripts/generate-variables-docs.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414
with open(yaml_path, "r") as file:
1515
data = yaml.safe_load(file)
1616

17-
preferred_order = [
18-
"synth",
19-
"floorplan",
20-
"place",
21-
"cts",
22-
"grt",
23-
"route",
24-
"final"
25-
]
17+
preferred_order = ["synth", "floorplan", "place", "cts", "grt", "route", "final"]
2618
stages = {stage for value in data.values() for stage in value.get("stages", [])}
2719
# convert set of stages to stages in a list in the preferred order, but
2820
# list all stages
@@ -38,7 +30,7 @@
3830
for key in sorted(data):
3931
value = data[key]
4032
description = value.get("description", "").replace("\n", " ").strip()
41-
table_rows += f"| <a name=\"{key}\"></a>{key} | {description} |\n"
33+
table_rows += f'| <a name="{key}"></a>{key} | {description} |\n'
4234

4335
markdown_table += table_header + table_rows
4436

@@ -47,10 +39,14 @@
4739
stage_keys = [
4840
key
4941
for key in sorted(data)
50-
if (("stages" in data[key] and stage in data[key]["stages"]) or
51-
("stages" not in data[key] and stage == "Uncategorized") or
52-
(stage == "All stages" and
53-
set(data[key].get("stages", [])) == set(stages)))
42+
if (
43+
("stages" in data[key] and stage in data[key]["stages"])
44+
or ("stages" not in data[key] and stage == "Uncategorized")
45+
or (
46+
stage == "All stages"
47+
and set(data[key].get("stages", [])) == set(stages)
48+
)
49+
)
5450
]
5551
markdown_table += "\n".join(map(lambda k: f"- [{k}](#{k})", stage_keys))
5652
markdown_table += "\n\n"

0 commit comments

Comments
 (0)