Skip to content

Commit 715b97e

Browse files
westurnerCarreau
authored andcommitted
CLN: core/display: pep8 specifies double newlines between module-level callables
1 parent 585357a commit 715b97e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

IPython/core/display.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,19 +794,22 @@ def _repr_javascript_(self):
794794
r += _lib_t2*len(self.lib)
795795
return r
796796

797+
797798
# constants for identifying png/jpeg/gif/webp data
798799
_PNG = b'\x89PNG\r\n\x1a\n'
799800
_JPEG = b'\xff\xd8'
800801
_GIF1 = b"GIF87a"
801802
_GIF2 = b"GIF89a"
802803
_WEBP = b'WEBP'
803804

805+
804806
def _pngxy(data):
805807
"""read the (width, height) from a PNG header"""
806808
ihdr = data.index(b'IHDR')
807809
# next 8 bytes are width/height
808810
return struct.unpack('>ii', data[ihdr+4:ihdr+12])
809811

812+
810813
def _jpegxy(data):
811814
"""read the (width, height) from a JPEG header"""
812815
# adapted from http://www.64lines.com/jpeg-width-height
@@ -826,10 +829,12 @@ def _jpegxy(data):
826829
h, w = struct.unpack('>HH', data[iSOF+5:iSOF+9])
827830
return w, h
828831

832+
829833
def _gifxy(data):
830834
"""read the (width, height) from a GIF header"""
831835
return struct.unpack('<HH', data[6:10])
832836

837+
833838
def _webpxy(data):
834839
"""read the (width, height) from a WEBP header"""
835840
if data[12:16] == b"VP8 ":

0 commit comments

Comments
 (0)