diff options
Diffstat (limited to 'sphinx/search/es.py')
-rw-r--r-- | sphinx/search/es.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sphinx/search/es.py b/sphinx/search/es.py index c6f0dae9c..1009961c8 100644 --- a/sphinx/search/es.py +++ b/sphinx/search/es.py @@ -8,13 +8,11 @@ :license: BSD, see LICENSE for details. """ -from sphinx.search import SearchLanguage, parse_stop_word +from typing import Dict import snowballstemmer -if False: - # For type annotation - from typing import Any # NOQA +from sphinx.search import SearchLanguage, parse_stop_word spanish_stopwords = parse_stop_word(''' @@ -371,10 +369,8 @@ class SearchSpanish(SearchLanguage): js_stemmer_code = js_stemmer stopwords = spanish_stopwords - def init(self, options): - # type: (Any) -> None + def init(self, options: Dict) -> None: self.stemmer = snowballstemmer.stemmer('spanish') - def stem(self, word): - # type: (str) -> str + def stem(self, word: str) -> str: return self.stemmer.stemWord(word.lower()) |