Skip to content

Commit 3e08bca

Browse files
authored
docs: fix ordering of yaml properties (#898)
Fix ordering of yaml properties
1 parent b82c778 commit 3e08bca

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

scripts/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def updateObjects(ref: str, output_path: Path):
116116
yaml.dump(
117117
[asdict(obj) for obj in objects],
118118
file,
119+
sort_keys=False,
119120
)
120121

121122

@@ -125,15 +126,15 @@ def updateCalcs(ref: str, output_path: Path):
125126
calcs.sort(key=lambda x: x.name)
126127
calcs = filter(test_calc, calcs)
127128
with open(output_path, "w") as file:
128-
yaml.dump([asdict(calc) for calc in calcs], file)
129+
yaml.dump([asdict(calc) for calc in calcs], file, sort_keys=False)
129130

130131

131132
def update_meta_info(commit: str, version: Union[tuple, str], output_path: Path):
132133
if isinstance(version, tuple):
133134
version = ".".join([str(x) for x in version])
134135
meta = {"commit": commit[0:7], "version": version}
135136
with open(output_path, "w") as file:
136-
yaml.dump(meta, file)
137+
yaml.dump(meta, file, sort_keys=False)
137138

138139

139140
if __name__ == "__main__":

scripts/src/parse_doxygen.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
@dataclass
99
class Attribute:
1010
name: str
11+
description: str
1112
dataType: str
1213
list: bool
1314
enums: List[str]
14-
tags: List[str]
15+
default: str
1516
postfix: List[str]
17+
snippet: str
1618
calc: bool
1719
noCnfg: bool
18-
default: str
19-
description: str
20-
snippet: str
2120
nosnippet: bool
21+
tags: List[str]
2222

2323

2424
@dataclass
2525
class SepticObject:
2626
name: str
2727
description: str
28-
attributes: List[Attribute]
2928
parents: List[str]
29+
attributes: List[Attribute]
3030

3131

3232
@dataclass

0 commit comments

Comments
 (0)