Skip to content

Commit

Permalink
fix: Set proper notfound_urls_prefix option types (#233)
Browse files Browse the repository at this point in the history
* fix: Set proper `notfound_urls_prefix` option types

* feat(tests): Simplify

* chore: restore lines

* again

---------

Co-authored-by: Manuel Kaufmann <[email protected]>
  • Loading branch information
BoboTiG and humitos committed May 23, 2024
1 parent bbc8127 commit 3032721
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions notfound/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ def setup(app):
default_version=default_version,
),
'html',
types=[str, type(None)],
)

app.connect('config-inited', validate_configs)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def test_urls_prefix_setting_none(app, status, warning):
for chunk in chunks:
assert chunk in content

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

@pytest.mark.sphinx(
srcdir=srcdir,
Expand Down

0 comments on commit 3032721

Please sign in to comment.