Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16236)

#21574: Port image types detections from PIL to the imghdr module

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 11 months ago by storchaka+cpython
Modified:
4 years, 6 months ago
Reviewers:
pcmanticore
CC:
fredrik_effbot.org, haypo, anandpillai_letterboxes.org, Claudiu.Popa, storchaka, coldmind
Visibility:
Public.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/imghdr.rst View 1 chunk +22 lines, -1 line 0 comments Download
Lib/imghdr.py View 7 chunks +96 lines, -6 lines 2 comments Download
Lib/test/imghdrdata/python.eps View 1 chunk +299 lines, -0 lines 0 comments Download
Lib/test/imghdrdata/python.xpm View 1 chunk +124 lines, -0 lines 0 comments Download
Lib/test/test_imghdr.py View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 1
Claudiu.Popa
4 years, 6 months ago #1
http://bugs.python.org/review/21574/diff/12977/Lib/imghdr.py
File Lib/imghdr.py (right):

http://bugs.python.org/review/21574/diff/12977/Lib/imghdr.py#newcode132
Lib/imghdr.py:132: if h.startswith(b'RIFF') and h[8:12] == b'WEBP' and h[12:16]
in (b"VP8 ", b"VP8X", b"VP8L"):
Please don't exceed 79 characters on a line.

http://bugs.python.org/review/21574/diff/12977/Lib/imghdr.py#newcode189
Lib/imghdr.py:189: and _i16_little_endian(h[12:18]) > 0 and
_i16_little_endian(h[14:18]) > 0:
Could you use paranthesis to break the line instead? It seems clearer with them
rather than using like break.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+