Skip to content

Commit 0b96575

Browse files
committed
reform auto-generated DAG Docs
1 parent 2d267bc commit 0b96575

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/dou_dag_generator.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,22 +161,17 @@ def prepare_doc_md(specs: DAGConfig, config_file: str) -> str:
161161
162162
**Configuração da dag definida no arquivo `{config_file}`**:
163163
164-
<dl>
164+
165165
"""
166166
)
167167
for key, value in config.items():
168-
doc_md = doc_md + f"<dt>{key}</dt>"
169-
if isinstance(value, list) or isinstance(value, set):
170-
doc_md = doc_md + (
171-
"<dd>\n\n"
172-
+ " * "
173-
+ "\n * ".join(str(item) for item in value)
174-
+ "\n</dd>"
175-
)
168+
doc_md += f"\n**{key.replace('_', ' ').capitalize()}**\n"
169+
170+
if isinstance(value, (list, set)):
171+
doc_md += "\n" + "\n".join(f"- {str(item)}" for item in value) + "\n"
176172
else:
177-
doc_md = doc_md + f"<dd>{str(value)}</dd>"
178-
doc_md = doc_md + "\n"
179-
doc_md = doc_md + "</dl>\n"
173+
doc_md += "\n" + f"- {str(value)}\n" + "\n"
174+
180175
return doc_md
181176

182177
@staticmethod

0 commit comments

Comments
 (0)