diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-24 12:12:45 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-24 12:12:45 +0300 |
commit | 445b9515c126aab84f14251e57e289cb12121754 (patch) | |
tree | 7032b82311cff77d74b66537499075480e7a8f5f /sphinx/search/__init__.py | |
parent | e4e5ee33307abdc65fba6244ae7349987ddae529 (diff) | |
parent | 071b14884c90e807827079ee18b1677ea71833e6 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/search/__init__.py')
-rw-r--r-- | sphinx/search/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 4fd566eeb..5850b86e2 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -288,8 +288,8 @@ class IndexBuilder: frozen.get('envversion') != self.env.version: raise ValueError('old format') index2fn = frozen['docnames'] - self._filenames = dict(zip(index2fn, frozen['filenames'])) # type: ignore - self._titles = dict(zip(index2fn, frozen['titles'])) # type: ignore + self._filenames = dict(zip(index2fn, frozen['filenames'])) + self._titles = dict(zip(index2fn, frozen['titles'])) def load_terms(mapping: Dict[str, Any]) -> Dict[str, Set[str]]: rv = {} @@ -350,13 +350,13 @@ class IndexBuilder: def get_terms(self, fn2index: Dict) -> Tuple[Dict[str, List[str]], Dict[str, List[str]]]: rvs = {}, {} # type: Tuple[Dict[str, List[str]], Dict[str, List[str]]] for rv, mapping in zip(rvs, (self._mapping, self._title_mapping)): - for k, v in mapping.items(): # type: ignore + for k, v in mapping.items(): if len(v) == 1: fn, = v if fn in fn2index: - rv[k] = fn2index[fn] # type: ignore + rv[k] = fn2index[fn] else: - rv[k] = sorted([fn2index[fn] for fn in v if fn in fn2index]) # type: ignore # NOQA + rv[k] = sorted([fn2index[fn] for fn in v if fn in fn2index]) return rvs def freeze(self) -> Dict[str, Any]: |