Skip to content

Commit

Permalink
HTML search: adjust type signature for custom scoring arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Sep 28, 2024
1 parent 4319c16 commit 23882e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 23882e9

Please sign in to comment.