diff options
| author | jfbu <jfbu@free.fr> | 2019-08-01 17:39:03 +0200 |
|---|---|---|
| committer | jfbu <jfbu@free.fr> | 2019-08-01 17:52:28 +0200 |
| commit | bfe921b3b238721ba3723330483be113ae8e68e3 (patch) | |
| tree | cdfec54399513450b119890b0f2472c9e5a4bddf | |
| parent | da3763170e7b1211ae4787a92453cf769ce6b614 (diff) | |
| download | sphinx-git-bfe921b3b238721ba3723330483be113ae8e68e3.tar.gz | |
Add Python3 type annotation to cherry-picked #6310 for 2.2.0 release
| -rw-r--r-- | sphinx/ext/imgmath.py | 6 |
1 files changed, 2 insertions, 4 deletions
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'<!-- DEPTH=(-?\d+) -->') -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: |
