summaryrefslogtreecommitdiff
path: root/sphinx/util/png.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/png.py')
-rw-r--r--sphinx/util/png.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/sphinx/util/png.py b/sphinx/util/png.py
index 6d1d5ea21..374d876a0 100644
--- a/sphinx/util/png.py
+++ b/sphinx/util/png.py
@@ -12,10 +12,6 @@
import binascii
import struct
-if False:
- # For type annotation
- from sphinx.util.typing import unicode # NOQA
-
LEN_IEND = 12
LEN_DEPTH = 22
@@ -26,7 +22,7 @@ IEND_CHUNK = b'\x00\x00\x00\x00IEND\xAE\x42\x60\x82'
def read_png_depth(filename):
- # type: (unicode) -> int
+ # type: (str) -> int
"""Read the special tEXt chunk indicating the depth from a PNG file."""
with open(filename, 'rb') as f:
f.seek(- (LEN_IEND + LEN_DEPTH), 2)
@@ -39,7 +35,7 @@ def read_png_depth(filename):
def write_png_depth(filename, depth):
- # type: (unicode, int) -> None
+ # type: (str, int) -> None
"""Write the special tEXt chunk indicating the depth to a PNG file.
The chunk is placed immediately before the special IEND chunk.