summaryrefslogtreecommitdiff
path: root/sphinx/pycode/nodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/pycode/nodes.py')
-rw-r--r--sphinx/pycode/nodes.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sphinx/pycode/nodes.py b/sphinx/pycode/nodes.py
index 099fc2cf2..b4b681d78 100644
--- a/sphinx/pycode/nodes.py
+++ b/sphinx/pycode/nodes.py
@@ -9,6 +9,10 @@
:license: BSD, see LICENSE for details.
"""
+if False:
+ # For type annotation
+ from typing import Callable # NOQA
+
class BaseNode(object):
"""
@@ -29,7 +33,7 @@ class BaseNode(object):
return NotImplemented
return not self._eq(other)
- __hash__ = None # type: str
+ __hash__ = None # type: Callable[[object], int]
def get_prev_sibling(self):
"""Return previous child in parent's children, or None."""