diff options
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r-- | sphinx/roles.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py index 862191831..ff24fcf55 100644 --- a/sphinx/roles.py +++ b/sphinx/roles.py @@ -11,7 +11,6 @@ import re import warnings from typing import Any, Dict, List, Tuple -from typing import Type # for python3.5.1 from docutils import nodes, utils from docutils.nodes import Element, Node, TextElement, system_message @@ -29,6 +28,7 @@ from sphinx.util.typing import RoleFunction if False: # For type annotation + from typing import Type # for python3.5.1 from sphinx.application import Sphinx from sphinx.environment import BuildEnvironment @@ -77,7 +77,7 @@ class XRefRole(ReferenceRole): innernodeclass = nodes.literal # type: Type[TextElement] def __init__(self, fix_parens: bool = False, lowercase: bool = False, - nodeclass: Type[Element] = None, innernodeclass: Type[TextElement] = None, + nodeclass: "Type[Element]" = None, innernodeclass: "Type[TextElement]" = None, warn_dangling: bool = False) -> None: self.fix_parens = fix_parens self.lowercase = lowercase |