summaryrefslogtreecommitdiff
path: root/sphinx/ext/graphviz.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/ext/graphviz.py
parenta340427ba4d208193d539cb7e8401be23d75547e (diff)
downloadsphinx-git-a504ac6100a577cbda1bedf80d69636603ee287c.tar.gz
Improve static typing strictness (#10569)
Diffstat (limited to 'sphinx/ext/graphviz.py')
-rw-r--r--sphinx/ext/graphviz.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py
index b4a69a0f2..0459c4a96 100644
--- a/sphinx/ext/graphviz.py
+++ b/sphinx/ext/graphviz.py
@@ -6,7 +6,7 @@ import re
import subprocess
from os import path
from subprocess import PIPE, CalledProcessError
-from typing import Any, Dict, List, Tuple
+from typing import Any, Dict, List, Optional, Tuple
from docutils import nodes
from docutils.nodes import Node
@@ -210,7 +210,7 @@ class GraphvizSimple(SphinxDirective):
def render_dot(self: SphinxTranslator, code: str, options: Dict, format: str,
- prefix: str = 'graphviz', filename: str = None) -> Tuple[str, str]:
+ prefix: str = 'graphviz', filename: Optional[str] = None) -> Tuple[str, str]:
"""Render graphviz code into a PNG or PDF output file."""
graphviz_dot = options.get('graphviz_dot', self.builder.config.graphviz_dot)
hashkey = (code + str(options) + str(graphviz_dot) +