diff --git a/sphinx/ext/imgmath.py b/sphinx/ext/imgmath.py index 51ebbeff4..b1d33b833 100644 --- a/sphinx/ext/imgmath.py +++ b/sphinx/ext/imgmath.py @@ -91,8 +91,7 @@ depthsvg_re = re.compile(br'.*, depth=(.*)pt') depthsvgcomment_re = re.compile(r'') -def read_svg_depth(filename): - # type: (str) -> int +def read_svg_depth(filename: str) -> int: """Read the depth from comment at last line of SVG file """ with open(filename, 'r') as f: @@ -105,8 +104,7 @@ def read_svg_depth(filename): return None -def write_svg_depth(filename, depth): - # type: (str, int) -> None +def write_svg_depth(filename: str, depth:int) -> None: """Write the depth to SVG file as a comment at end of file """ with open(filename, 'a') as f: