Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML search: adjust type signatures for custom HTML scoring #12829

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ def setup(app: Sphinx) -> ExtensionMetadata:
app.add_config_value('html_secnumber_suffix', '. ', 'html')
app.add_config_value('html_search_language', None, 'html', str)
app.add_config_value('html_search_options', {}, 'html')
app.add_config_value('html_search_scorer', '', '')
app.add_config_value('html_search_scorer', None, '', str)
app.add_config_value('html_scaled_image_link', True, 'html')
app.add_config_value('html_baseurl', '', 'html')
# removal is indefinitely on hold (ref: https://github.com/sphinx-doc/sphinx/issues/10265)
Expand Down
2 changes: 1 addition & 1 deletion sphinx/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class IndexBuilder:
'pickle': pickle
}

def __init__(self, env: BuildEnvironment, lang: str, options: dict[str, str], scoring: str) -> None:
def __init__(self, env: BuildEnvironment, lang: str, options: dict[str, str], scoring: str | None) -> None:
self.env = env
# docname -> title
self._titles: dict[str, str | None] = env._search_index_titles
Expand Down