Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 504a4af

Browse files
committed
test.py: add docs to autogen* fns explaining what they return/yield now
1 parent 387b808 commit 504a4af

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/templates.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,15 @@ def render_script(template: str, out_path: str, params: Dict):
9696

9797

9898
def autogen_cargo(conf_file, yaml: Dict) -> Generator[Path]:
99+
"""
100+
Yield generated paths.
101+
"""
102+
99103
def render_stage(stage_conf: Mapping[str, Any] | None, filename: str) -> Generator[Path]:
104+
"""
105+
Yield generated paths.
106+
"""
107+
100108
if not isinstance(stage_conf, Mapping):
101109
return
102110
if not stage_conf:
@@ -126,6 +134,10 @@ def render_stage(stage_conf: Mapping[str, Any] | None, filename: str) -> Generat
126134

127135

128136
def autogen_refactor(conf_file, yaml: Dict) -> Generator[str]:
137+
"""
138+
Yield generated paths.
139+
"""
140+
129141
refactor = yaml.get("refactor")
130142
if refactor and isinstance(refactor, Dict):
131143
ag = refactor.get("autogen")
@@ -154,6 +166,10 @@ def autogen_refactor(conf_file, yaml: Dict) -> Generator[str]:
154166

155167

156168
def autogen_transpile(conf_file, yaml: Dict) -> Generator[Path]:
169+
"""
170+
Yield generated paths.
171+
"""
172+
157173
transpile = yaml.get("transpile")
158174
if transpile and isinstance(transpile, Dict):
159175
ag = transpile.get("autogen")
@@ -186,6 +202,10 @@ def autogen_transpile(conf_file, yaml: Dict) -> Generator[Path]:
186202

187203

188204
def autogen(conf: Config) -> Generator[Path]:
205+
"""
206+
Yield generated paths.
207+
"""
208+
189209
for (cf, yaml) in conf.project_conf.items():
190210
yield from autogen_transpile(cf, yaml)
191211
yield from autogen_refactor(cf, yaml)

0 commit comments

Comments
 (0)