diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-13 23:29:38 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-07-13 23:46:17 +0900 |
commit | 0c48a28ad7216ee064b0db564745d749c049bfd5 (patch) | |
tree | 2bc2f13992c930c00bd3b60ea3e2c27c31e659cd /sphinx/util/nodes.py | |
parent | 0bc530f1b7b3303e0f53e42010b629d67e79b835 (diff) | |
download | sphinx-git-0c48a28ad7216ee064b0db564745d749c049bfd5.tar.gz |
Fix type annotation for python 3.5.1
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r-- | sphinx/util/nodes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index e0aaaa14e..abbc432df 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -10,7 +10,7 @@ import re import warnings -from typing import Any, Callable, Iterable, List, Set, Tuple, Type +from typing import Any, Callable, Iterable, List, Set, Tuple from typing import cast from docutils import nodes @@ -26,6 +26,7 @@ from sphinx.util import logging if False: # For type annotation + from typing import Type # for python3.5.1 from sphinx.builders import Builder from sphinx.utils.tags import Tags @@ -59,7 +60,7 @@ class NodeMatcher: # => [<reference ...>, <reference ...>, ...] """ - def __init__(self, *classes: Type[Node], **attrs) -> None: + def __init__(self, *classes: "Type[Node]", **attrs) -> None: self.classes = classes self.attrs = attrs |