From cbc056f43d8ae0432de5b9e8d882155b4eb74961 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 9 Apr 2018 23:48:36 +1000 Subject: [PATCH] Fixed whitespace --- Tests/test_font_pcf.py | 2 +- Tests/test_image_access.py | 2 +- Tests/test_image_transform.py | 2 +- src/PIL/IcnsImagePlugin.py | 2 +- src/PIL/PdfParser.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/test_font_pcf.py b/Tests/test_font_pcf.py index 2b344c6c2..9d7d4d558 100644 --- a/Tests/test_font_pcf.py +++ b/Tests/test_font_pcf.py @@ -66,7 +66,7 @@ class TestFontPcf(PillowTestCase): def _test_high_characters(self, message): tempname = self.save_font() font = ImageFont.load(tempname) - im = Image.new("L", (750, 30) , "white") + im = Image.new("L", (750, 30), "white") draw = ImageDraw.Draw(im) draw.text((0, 0), message, "black", font=font) with Image.open('Tests/images/high_ascii_chars.png') as target: diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index 155fa5c2e..9cc623856 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -295,7 +295,7 @@ int main(int argc, char* argv[]) compiler.add_include_dir(sysconfig.get_python_inc()) libdir = sysconfig.get_config_var('LIBDIR') or sysconfig.get_python_inc().replace('include', 'libs') - print (libdir) + print(libdir) compiler.add_library_dir(libdir) objects = compiler.compile(['embed_pil.c']) compiler.link_executable(objects, 'embed_pil') diff --git a/Tests/test_image_transform.py b/Tests/test_image_transform.py index a3ab7805f..9cb6ac2c2 100644 --- a/Tests/test_image_transform.py +++ b/Tests/test_image_transform.py @@ -59,7 +59,7 @@ class TestImageTransform(PillowTestCase): (0, 0, w*2, h*2), Image.BILINEAR, - fillcolor = 'red') + fillcolor='red') self.assertEqual(transformed.getpixel((w-1, h-1)), (255, 0, 0)) diff --git a/src/PIL/IcnsImagePlugin.py b/src/PIL/IcnsImagePlugin.py index b382a73e1..acc7fcba0 100644 --- a/src/PIL/IcnsImagePlugin.py +++ b/src/PIL/IcnsImagePlugin.py @@ -310,7 +310,7 @@ def _save(im, fp, filename): # create the temporary set of pngs iconset = tempfile.mkdtemp('.iconset') - provided_images = {im.width:im for im in + provided_images = {im.width: im for im in im.encoderinfo.get("append_images", [])} last_w = None for w in [16, 32, 128, 256, 512]: diff --git a/src/PIL/PdfParser.py b/src/PIL/PdfParser.py index b6938fdb7..5cc5a1bbb 100644 --- a/src/PIL/PdfParser.py +++ b/src/PIL/PdfParser.py @@ -211,7 +211,7 @@ class PdfName: def from_pdf_stream(klass, data): return klass(PdfParser.interpret_name(data)) - allowed_chars = set(range(33,127)) - set(ord(c) for c in "#%/()<>[]{}") + allowed_chars = set(range(33, 127)) - set(ord(c) for c in "#%/()<>[]{}") def __bytes__(self): if str == bytes: # Python 2.x