summaryrefslogtreecommitdiff
path: root/sphinx/domains/math.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/domains/math.py')
-rw-r--r--sphinx/domains/math.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/domains/math.py b/sphinx/domains/math.py
index 88db1ad0e..aa6f9422d 100644
--- a/sphinx/domains/math.py
+++ b/sphinx/domains/math.py
@@ -8,7 +8,7 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple
+from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple
from docutils import nodes
from docutils.nodes import Element, Node, make_id, system_message
@@ -97,7 +97,7 @@ class MathDomain(Domain):
def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: "Builder",
typ: str, target: str, node: pending_xref, contnode: Element
- ) -> Element:
+ ) -> Optional[Element]:
assert typ in ('eq', 'numref')
docname, number = self.equations.get(target, (None, None))
if docname: