summaryrefslogtreecommitdiff
path: root/sphinx/domains/math.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-01-01 20:43:59 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2023-01-01 20:48:39 +0000
commit14a9289d780240bbce78ad3640e8e1b1b12df43f (patch)
treefd753f5b0f8c7053923b78c8fef2b90b60f9c7fa /sphinx/domains/math.py
parent26f79b0d2dd88b353ac65623897bdfbe8bc07cab (diff)
downloadsphinx-git-14a9289d780240bbce78ad3640e8e1b1b12df43f.tar.gz
Use PEP 604 types
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 dc52d1bfd..9ca3eb030 100644
--- a/sphinx/domains/math.py
+++ b/sphinx/domains/math.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import TYPE_CHECKING, Any, Iterable, Optional
+from typing import TYPE_CHECKING, Any, Iterable
from docutils import nodes
from docutils.nodes import Element, Node, make_id, system_message
@@ -91,7 +91,7 @@ class MathDomain(Domain):
def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: "Builder",
typ: str, target: str, node: pending_xref, contnode: Element
- ) -> Optional[Element]:
+ ) -> Element | None:
assert typ in ('eq', 'numref')
docname, number = self.equations.get(target, (None, None))
if docname: