diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-14 21:14:11 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-15 17:57:43 +0300 |
commit | 6bc357140dbb074eb0d590c1226009f83f97862e (patch) | |
tree | a7c8d2087ee1f50dadb5ca78343ac10c6959b740 /sphinx/util/png.py | |
parent | 0031c9b4822ae9684888ae90bc70d6ceb3313581 (diff) |
Replace all "unicode" type by "str"
Diffstat (limited to 'sphinx/util/png.py')
-rw-r--r-- | sphinx/util/png.py | 8 |
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. |