Skip to content

Commit 37f1065

Browse files
committed
Clean up commented out debug print statements
1 parent 9dd09fa commit 37f1065

18 files changed

+0
-90
lines changed

Tests/make_hash.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,5 @@ def check(size, i0):
5252

5353
print()
5454

55-
# print(check(min_size, min_start))
56-
5755
print("#define ACCESS_TABLE_SIZE", min_size)
5856
print("#define ACCESS_TABLE_HASH", min_start)
59-
60-
# for m in modes:
61-
# print(m, "=>", hash(m, min_start) % min_size)

Tests/test_bmp_reference.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def test_bad(self):
2222
im.load()
2323
except Exception: # as msg:
2424
pass
25-
# print("Bad Image %s: %s" %(f,msg))
2625

2726
def test_questionable(self):
2827
""" These shouldn't crash/dos, but it's not well defined that these
@@ -47,7 +46,6 @@ def test_questionable(self):
4746
except Exception: # as msg:
4847
if os.path.basename(f) in supported:
4948
raise
50-
# print("Bad Image %s: %s" %(f,msg))
5149

5250
def test_good(self):
5351
""" These should all work. There's a set of target files in the

Tests/test_format_hsv.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ def wedge(self):
4747

4848
img = Image.merge('RGB', (r, g, b))
4949

50-
# print(("%d, %d -> "% (int(1.75*px),int(.25*px))) + \
51-
# "(%s, %s, %s)"%img.getpixel((1.75*px, .25*px)))
52-
# print(("%d, %d -> "% (int(.75*px),int(.25*px))) + \
53-
# "(%s, %s, %s)"%img.getpixel((.75*px, .25*px)))
5450
return img
5551

5652
def to_xxx_colorsys(self, im, func, mode):
@@ -95,32 +91,16 @@ def test_wedge(self):
9591
im = src.convert('HSV')
9692
comparable = self.to_hsv_colorsys(src)
9793

98-
# print(im.getpixel((448, 64)))
99-
# print(comparable.getpixel((448, 64)))
100-
101-
# print(im.split()[0].histogram())
102-
# print(comparable.split()[0].histogram())
103-
104-
# im.split()[0].show()
105-
# comparable.split()[0].show()
106-
10794
self.assert_image_similar(im.getchannel(0), comparable.getchannel(0),
10895
1, "Hue conversion is wrong")
10996
self.assert_image_similar(im.getchannel(1), comparable.getchannel(1),
11097
1, "Saturation conversion is wrong")
11198
self.assert_image_similar(im.getchannel(2), comparable.getchannel(2),
11299
1, "Value conversion is wrong")
113100

114-
# print(im.getpixel((192, 64)))
115-
116101
comparable = src
117102
im = im.convert('RGB')
118103

119-
# im.split()[0].show()
120-
# comparable.split()[0].show()
121-
# print(im.getpixel((192, 64)))
122-
# print(comparable.getpixel((192, 64)))
123-
124104
self.assert_image_similar(im.getchannel(0), comparable.getchannel(0),
125105
3, "R conversion is wrong")
126106
self.assert_image_similar(im.getchannel(1), comparable.getchannel(1),
@@ -132,12 +112,6 @@ def test_convert(self):
132112
im = hopper('RGB').convert('HSV')
133113
comparable = self.to_hsv_colorsys(hopper('RGB'))
134114

135-
# print([ord(x) for x in im.split()[0].tobytes()[:80]])
136-
# print([ord(x) for x in comparable.split()[0].tobytes()[:80]])
137-
138-
# print(im.split()[0].histogram())
139-
# print(comparable.split()[0].histogram())
140-
141115
self.assert_image_similar(im.getchannel(0), comparable.getchannel(0),
142116
1, "Hue conversion is wrong")
143117
self.assert_image_similar(im.getchannel(1), comparable.getchannel(1),
@@ -150,12 +124,6 @@ def test_hsv_to_rgb(self):
150124
converted = comparable.convert('RGB')
151125
comparable = self.to_rgb_colorsys(comparable)
152126

153-
# print(converted.split()[1].histogram())
154-
# print(target.split()[1].histogram())
155-
156-
# print([ord(x) for x in target.split()[1].tobytes()[:80]])
157-
# print([ord(x) for x in converted.split()[1].tobytes()[:80]])
158-
159127
self.assert_image_similar(converted.getchannel(0),
160128
comparable.getchannel(0),
161129
3, "R conversion is wrong")

Tests/test_image_resample.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,15 @@ def test_box_vertical(self):
352352
class CoreResampleCoefficientsTest(PillowTestCase):
353353
def test_reduce(self):
354354
test_color = 254
355-
# print()
356355

357356
for size in range(400000, 400010, 2):
358-
# print(size)
359357
i = Image.new('L', (size, 1), 0)
360358
draw = ImageDraw.Draw(i)
361359
draw.rectangle((0, 0, i.size[0] // 2 - 1, 0), test_color)
362360

363361
px = i.resize((5, i.size[1]), Image.BICUBIC).load()
364362
if px[2, 0] != test_color // 2:
365363
self.assertEqual(test_color // 2, px[2, 0])
366-
# print('>', size, test_color // 2, px[2, 0])
367364

368365
def test_nonzero_coefficients(self):
369366
# regression test for the wrong coefficients calculation

Tests/test_imagewin_pointers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def test_pointer(self):
9696
hdr.biClrImportant = 0
9797

9898
hdc = CreateCompatibleDC(None)
99-
# print('hdc:',hex(hdc))
10099
pixels = ctypes.c_void_p()
101100
dib = CreateDIBSection(hdc, ctypes.byref(hdr), DIB_RGB_COLORS,
102101
ctypes.byref(pixels), None, 0)

Tests/test_numpy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def to_image(dtype, bands=1, boolean=0):
3434
i = Image.fromarray(a)
3535
if list(i.getchannel(0).getdata()) != list(range(100)):
3636
print("data mismatch for", dtype)
37-
# print(dtype, list(i.getdata()))
3837
return i
3938

4039
# Check supported 1-bit integer formats

src/PIL/BdfFontFile.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,6 @@ def __init__(self, fp):
110110
if s.find(b"LogicalFontDescription") < 0:
111111
comments.append(s[i+1:-1].decode('ascii'))
112112

113-
# font = props["FONT"].split("-")
114-
115-
# font[4] = bdf_slant[font[4].upper()]
116-
# font[11] = bdf_spacing[font[11].upper()]
117-
118-
# ascent = int(props["FONT_ASCENT"])
119-
# descent = int(props["FONT_DESCENT"])
120-
121-
# fontname = ";".join(font[1:])
122-
123-
# print("#", fontname)
124-
# for i in comments:
125-
# print("#", i)
126-
127113
while True:
128114
c = bdf_char(fp)
129115
if not c:

src/PIL/CurImagePlugin.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ def _open(self):
5656
m = s
5757
elif i8(s[0]) > i8(m[0]) and i8(s[1]) > i8(m[1]):
5858
m = s
59-
# print("width", i8(s[0]))
60-
# print("height", i8(s[1]))
61-
# print("colors", i8(s[2]))
62-
# print("reserved", i8(s[3]))
63-
# print("hotspot x", i16(s[4:]))
64-
# print("hotspot y", i16(s[6:]))
65-
# print("bytes", i32(s[8:]))
66-
# print("offset", i32(s[12:]))
6759
if not m:
6860
raise TypeError("No cursors were found")
6961

src/PIL/EpsImagePlugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def Ghostscript(tile, size, fp, scale=1):
8282
# resolution is dependent on bbox and size
8383
res = (float((72.0 * size[0]) / (bbox[2]-bbox[0])),
8484
float((72.0 * size[1]) / (bbox[3]-bbox[1])))
85-
# print("Ghostscript", scale, size, orig_size, bbox, orig_bbox, res)
8685

8786
import subprocess
8887
import tempfile

src/PIL/FontFile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def compile(self):
9090
x = xx
9191
s = src[0] + x0, src[1] + y0, src[2] + x0, src[3] + y0
9292
self.bitmap.paste(im.crop(src), s)
93-
# print(chr(i), dst, s)
9493
self.metrics[i] = d, dst, s
9594

9695
def save(self, filename):

0 commit comments

Comments
 (0)