Skip to content

Commit dd6fc46

Browse files
committed
fix: add toml to test dependency group for docs-scripts CI
python_ref_builder imports toml which is not a transitive dependency of any workspace package. Adding it to the test group so the docs-scripts-tests CI job can find it. JIRA: trivial risk: nonprod
1 parent 68c4377 commit dd6fc46

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ type = [
4848
test = [
4949
# Common test dependencies used across all workspace packages
5050
"pytest~=8.3.4",
51+
# Required by scripts/docs/ tests (python_ref_builder uses toml)
52+
"toml~=0.10.2",
5153
"pytest-cov~=6.0.0",
5254
"pytest-json-report==1.5.0",
5355
# Additional test dependencies used by multiple packages

scripts/docs/python_ref_builder.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,19 @@ def _object_partial_context(obj_data: dict, path: list[str], resolver: LinkResol
175175
ctx["long_description"] = resolver.all_links(ds.get("long_description", "") or "")
176176

177177
# Parameters
178-
if ds:
179-
params = ds.get("params")
180-
if params and len(params) > 0:
181-
ctx["params"] = [
182-
{
183-
"name": p["arg_name"],
184-
"type": resolver.type_link(p.get("type_name", "")),
185-
"description": resolver.all_links(p.get("description", "") or ""),
186-
}
187-
for p in params
188-
]
189-
elif obj_data.get("signature", {}).get("params") and len(obj_data["signature"]["params"]) > 0:
190-
ctx["sig_params"] = [
191-
{"name": sp[0], "type": resolver.type_link(sp[1])} for sp in obj_data["signature"]["params"]
192-
]
193-
elif obj_data.get("signature", {}).get("params") and len(obj_data["signature"]["params"]) > 0:
194-
ctx["sig_params"] = [
195-
{"name": sp[0], "type": resolver.type_link(sp[1])} for sp in obj_data["signature"]["params"]
178+
sig_params = obj_data.get("signature", {}).get("params") or []
179+
doc_params = ds.get("params") if ds else None
180+
if doc_params and len(doc_params) > 0:
181+
ctx["params"] = [
182+
{
183+
"name": p["arg_name"],
184+
"type": resolver.type_link(p.get("type_name", "")),
185+
"description": resolver.all_links(p.get("description", "") or ""),
186+
}
187+
for p in doc_params
196188
]
189+
elif sig_params:
190+
ctx["sig_params"] = [{"name": sp[0], "type": resolver.type_link(sp[1])} for sp in sig_params]
197191

198192
# Returns
199193
if ds:

uv.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)