diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 12:19:09 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 23:17:34 +0900 |
commit | 554199d30e418f72f215fae65924b47249d2544c (patch) | |
tree | fd952e21a8f4e9dabf91c5e3731dea3712ade006 /sphinx/util/typing.py | |
parent | 28b1aceefedbb9c3a12d6ba7c712df8ad5e98db8 (diff) | |
download | sphinx-git-554199d30e418f72f215fae65924b47249d2544c.tar.gz |
Upgrade to mypy-0.5
Diffstat (limited to 'sphinx/util/typing.py')
-rw-r--r-- | sphinx/util/typing.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py new file mode 100644 index 000000000..20c8883e4 --- /dev/null +++ b/sphinx/util/typing.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +""" + sphinx.util.typing + ~~~~~~~~~~~~~~~~~~ + + The composit types for Sphinx. + + :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from six import PY3 +from typing import Callable, Dict, List, Tuple + +from docutils import nodes +from docutils.parsers.rst.states import Inliner + + +if PY3: + unicode = str + +# common role functions +RoleFunction = Callable[[unicode, unicode, unicode, int, Inliner, Dict, List[unicode]], + Tuple[List[nodes.Node], List[nodes.Node]]] |