summaryrefslogtreecommitdiff
path: root/sphinx/util/typing.py
blob: 793504b775e17ab22b64cd527fc704584f2c1818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: utf-8 -*-
"""
    sphinx.util.typing
    ~~~~~~~~~~~~~~~~~~

    The composit types for Sphinx.

    :copyright: Copyright 2007-2018 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]]]