diff options
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r-- | sphinx/domains/cpp.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 417bdb2b6..2d948b853 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -32,7 +32,8 @@ from sphinx.util.nodes import make_refnode if False: # For type annotation - from typing import Any, Callable, Dict, Iterator, List, Match, Pattern, Tuple, Union # NOQA + from docutils.nodes import TextElement + from typing import Any, Callable, Dict, Iterator, List, Match, Pattern, Tuple, Type, Union # NOQA from sphinx.application import Sphinx # NOQA from sphinx.builders import Builder # NOQA from sphinx.config import Config # NOQA @@ -6980,7 +6981,7 @@ class CPPExprRole: if asCode: # render the expression as inline code self.class_type = 'cpp-expr' - self.node_type = nodes.literal + self.node_type = nodes.literal # type: Type[TextElement] else: # render the expression as inline text self.class_type = 'cpp-texpr' |