Skip to content

Commit 3032721

Browse files
BoboTiGhumitos
andauthored
fix: Set proper notfound_urls_prefix option types (readthedocs#233)
* fix: Set proper `notfound_urls_prefix` option types * feat(tests): Simplify * chore: restore lines * again --------- Co-authored-by: Manuel Kaufmann <[email protected]>
1 parent bbc8127 commit 3032721

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

notfound/extension.py

+1
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ def setup(app):
299299
default_version=default_version,
300300
),
301301
'html',
302+
types=[str, type(None)],
302303
)
303304

304305
app.connect('config-inited', validate_configs)

tests/test_urls.py

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ def test_urls_prefix_setting_none(app, status, warning):
196196
for chunk in chunks:
197197
assert chunk in content
198198

199+
assert "The config value `notfound_urls_prefix' has type `NoneType', defaults to `str'" not in warning.getvalue()
200+
assert "build succeeded." in status.getvalue()
199201

200202
@pytest.mark.sphinx(
201203
srcdir=srcdir,

0 commit comments

Comments
 (0)