diff options
Diffstat (limited to 'sphinx/util/typing.py')
-rw-r--r-- | sphinx/util/typing.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index 2cacc7785..2ac03c916 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -13,7 +13,15 @@ from typing import Callable, Dict, List, Tuple from docutils import nodes from docutils.parsers.rst.states import Inliner -from six import text_type +from six import PY2, text_type + + +# a typedef for unicode to make migration to mypy-py3 mode easy +# Note: It will be removed after migrated (soon). +if PY2: + unicode = text_type +else: + unicode = str # common role functions |