summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.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/nodes.py
parenta340427ba4d208193d539cb7e8401be23d75547e (diff)
downloadsphinx-git-a504ac6100a577cbda1bedf80d69636603ee287c.tar.gz
Improve static typing strictness (#10569)
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index 1a861a060..0646b44e6 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -513,7 +513,7 @@ _non_id_translate_digraphs = {
def make_id(env: "BuildEnvironment", document: nodes.document,
- prefix: str = '', term: str = None) -> str:
+ prefix: str = '', term: Optional[str] = None) -> str:
"""Generate an appropriate node_id for given *prefix* and *term*."""
node_id = None
if prefix:
@@ -550,7 +550,8 @@ def find_pending_xref_condition(node: addnodes.pending_xref, condition: str
def make_refnode(builder: "Builder", fromdocname: str, todocname: str, targetid: str,
- child: Union[Node, List[Node]], title: str = None) -> nodes.reference:
+ child: Union[Node, List[Node]], title: Optional[str] = None
+ ) -> nodes.reference:
"""Shortcut to create a reference node."""
node = nodes.reference('', '', internal=True)
if fromdocname == todocname and targetid: