diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 03:14:11 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 23:57:43 +0900 |
commit | 6bc357140dbb074eb0d590c1226009f83f97862e (patch) | |
tree | a7c8d2087ee1f50dadb5ca78343ac10c6959b740 /sphinx/util/jsonimpl.py | |
parent | 0031c9b4822ae9684888ae90bc70d6ceb3313581 (diff) | |
download | sphinx-git-6bc357140dbb074eb0d590c1226009f83f97862e.tar.gz |
Replace all "unicode" type by "str"
Diffstat (limited to 'sphinx/util/jsonimpl.py')
-rw-r--r-- | sphinx/util/jsonimpl.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py index b06d32b91..ba47cf29f 100644 --- a/sphinx/util/jsonimpl.py +++ b/sphinx/util/jsonimpl.py @@ -17,13 +17,12 @@ from six import text_type if False: # For type annotation from typing import Any, IO # NOQA - from sphinx.util.typing import unicode # NOQA class SphinxJSONEncoder(json.JSONEncoder): """JSONEncoder subclass that forces translation proxies.""" def default(self, obj): - # type: (Any) -> unicode + # type: (Any) -> str if isinstance(obj, UserString): return text_type(obj) return super(SphinxJSONEncoder, self).default(obj) @@ -36,7 +35,7 @@ def dump(obj, fp, *args, **kwds): def dumps(obj, *args, **kwds): - # type: (Any, Any, Any) -> unicode + # type: (Any, Any, Any) -> str kwds['cls'] = SphinxJSONEncoder return json.dumps(obj, *args, **kwds) |