summaryrefslogtreecommitdiff
path: root/sphinx/util/math.py
diff options
context:
space:
mode:
authordanieleades <33452915+danieleades@users.noreply.github.com>2022-07-18 22:08:16 +0100
committerGitHub <noreply@github.com>2022-07-18 22:08:16 +0100
commita504ac6100a577cbda1bedf80d69636603ee287c (patch)
tree0aa79585440486bdb109f7238f8f5c992dad0d99 /sphinx/util/math.py
parenta340427ba4d208193d539cb7e8401be23d75547e (diff)
downloadsphinx-git-a504ac6100a577cbda1bedf80d69636603ee287c.tar.gz
Improve static typing strictness (#10569)
Diffstat (limited to 'sphinx/util/math.py')
-rw-r--r--sphinx/util/math.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/util/math.py b/sphinx/util/math.py
index 7caf662dc..0c42a00ed 100644
--- a/sphinx/util/math.py
+++ b/sphinx/util/math.py
@@ -1,5 +1,7 @@
"""Utility functions for math."""
+from typing import Optional
+
from docutils import nodes
from sphinx.builders.html import HTMLTranslator
@@ -20,7 +22,7 @@ def get_node_equation_number(writer: HTMLTranslator, node: nodes.math_block) ->
return node['number']
-def wrap_displaymath(text: str, label: str, numbering: bool) -> str:
+def wrap_displaymath(text: str, label: Optional[str], numbering: bool) -> str:
def is_equation(part: str) -> str:
return part.strip()