Skip to content

Commit 3f9e2fb

Browse files
committed
fix(config): Restore rediraffe_redirects default dropped in workspace refactor
why: The original value "redirects.txt" was changed to {} during the workspace split (82a1441). The test asserting {} was written to match the bug. Projects relying on automatic redirect generation from a redirects.txt file would silently get no redirects. what: - Restore "rediraffe_redirects": "redirects.txt" in merge_sphinx_config() - Fix test to assert the correct "redirects.txt" value
1 parent bd92431 commit 3f9e2fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/gp-sphinx/src/gp_sphinx/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def merge_sphinx_config(
409409
DEFAULT_COPYBUTTON_LINE_CONTINUATION_CHARACTER
410410
),
411411
# Rediraffe
412-
"rediraffe_redirects": {},
412+
"rediraffe_redirects": "redirects.txt",
413413
"rediraffe_branch": "master~1",
414414
# Warnings
415415
"suppress_warnings": list(DEFAULT_SUPPRESS_WARNINGS),

tests/test_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,14 @@ def test_merge_sphinx_config_html_paths() -> None:
385385
assert "html_extra_path" not in result
386386

387387

388-
def test_merge_sphinx_config_redirects_are_opt_in() -> None:
389-
"""Redirect generation defaults stay quiet for minimal consumers."""
388+
def test_merge_sphinx_config_redirects_default() -> None:
389+
"""Redirect generation defaults to redirects.txt file path."""
390390
result = merge_sphinx_config(
391391
project="test",
392392
version="1.0",
393393
copyright="2026",
394394
)
395-
assert result["rediraffe_redirects"] == {}
395+
assert result["rediraffe_redirects"] == "redirects.txt"
396396

397397

398398
def test_make_linkcode_resolve_preserves_package_dir() -> None:

0 commit comments

Comments
 (0)