diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-20 19:50:08 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-21 06:47:15 -0800 |
commit | b8631079bfac00c7823b25990105b85a180208b4 (patch) | |
tree | c579987fbf4d5cee55ba32b9f4166af0365486e1 /sphinx/search | |
parent | c4df9b5de2f57387a23ec5b28f74b5e760040dd6 (diff) | |
download | sphinx-git-b8631079bfac00c7823b25990105b85a180208b4.tar.gz |
Replace six.string_types with native str
Diffstat (limited to 'sphinx/search')
-rw-r--r-- | sphinx/search/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 3008ab6f3..f92120010 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -12,7 +12,7 @@ import pickle import re from os import path -from six import text_type, string_types +from six import text_type from docutils.nodes import raw, comment, title, Text, NodeVisitor, SkipNode @@ -291,7 +291,7 @@ class IndexBuilder: def load(self, stream, format): # type: (IO, Any) -> None """Reconstruct from frozen data.""" - if isinstance(format, string_types): + if isinstance(format, str): format = self.formats[format] frozen = format.load(stream) # if an old index is present, we treat it as not existing. @@ -319,7 +319,7 @@ class IndexBuilder: def dump(self, stream, format): # type: (IO, Any) -> None """Dump the frozen index to a stream.""" - if isinstance(format, string_types): + if isinstance(format, str): format = self.formats[format] format.dump(self.freeze(), stream) |