Update sphinx/builders/html/__init__.py

This commit is contained in:
Thomas Grainger 2021-02-28 12:00:18 +00:00 committed by GitHub
parent 4f01fe08fa
commit ae5986f9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1260,11 +1260,7 @@ def migrate_html_add_permalinks(app: Sphinx, config: Config) -> None:
# RemovedInSphinx60Warning
logger.warning(__('html_add_permalinks has been deprecated since v3.5.0. '
'Please use html_permalinks and html_permalinks_icon instead.'))
if (
html_add_permalinks is None or
html_add_permalinks is False or
html_add_permalinks == ""
):
if not html_add_permalinks:
config.html_permalinks = False # type: ignore[attr-defined]
return