mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	Flake8 fixes
This commit is contained in:
		
							parent
							
								
									9ba3799980
								
							
						
					
					
						commit
						a83bcec169
					
				|  | @ -132,7 +132,8 @@ class BmpImageFile(ImageFile.ImageFile): | ||||||
|             SUPPORTED = { |             SUPPORTED = { | ||||||
|                 32: [(0xff0000, 0xff00, 0xff, 0x0), (0xff0000, 0xff00, 0xff, 0xff000000), (0x0, 0x0, 0x0, 0x0)], |                 32: [(0xff0000, 0xff00, 0xff, 0x0), (0xff0000, 0xff00, 0xff, 0xff000000), (0x0, 0x0, 0x0, 0x0)], | ||||||
|                 24: [(0xff0000, 0xff00, 0xff)], |                 24: [(0xff0000, 0xff00, 0xff)], | ||||||
|             16: [(0xf800, 0x7e0, 0x1f), (0x7c00, 0x3e0, 0x1f)]} |                 16: [(0xf800, 0x7e0, 0x1f), (0x7c00, 0x3e0, 0x1f)] | ||||||
|  |             } | ||||||
|             MASK_MODES = { |             MASK_MODES = { | ||||||
|                 (32, (0xff0000, 0xff00, 0xff, 0x0)): "BGRX", |                 (32, (0xff0000, 0xff00, 0xff, 0x0)): "BGRX", | ||||||
|                 (32, (0xff0000, 0xff00, 0xff, 0xff000000)): "BGRA", |                 (32, (0xff0000, 0xff00, 0xff, 0xff000000)): "BGRA", | ||||||
|  |  | ||||||
|  | @ -17,11 +17,13 @@ class TestImageFontBitmap(PillowTestCase): | ||||||
|             font='Tests/fonts/DejaVuSans.ttf', size=24) |             font='Tests/fonts/DejaVuSans.ttf', size=24) | ||||||
|         font_bitmap = ImageFont.truetype( |         font_bitmap = ImageFont.truetype( | ||||||
|             font='Tests/fonts/DejaVuSans-bitmap.ttf', size=24) |             font='Tests/fonts/DejaVuSans-bitmap.ttf', size=24) | ||||||
|         size_outline, size_bitmap = font_outline.getsize(text), font_bitmap.getsize(text) |         size_outline = font_outline.getsize(text) | ||||||
|  |         size_bitmap = font_bitmap.getsize(text) | ||||||
|         size_final = max(size_outline[0], size_bitmap[0]), max(size_outline[1], size_bitmap[1]) |         size_final = max(size_outline[0], size_bitmap[0]), max(size_outline[1], size_bitmap[1]) | ||||||
|         im_bitmap = Image.new('RGB', size_final, (255, 255, 255)) |         im_bitmap = Image.new('RGB', size_final, (255, 255, 255)) | ||||||
|         im_outline = im_bitmap.copy() |         im_outline = im_bitmap.copy() | ||||||
|         draw_bitmap, draw_outline = ImageDraw.Draw(im_bitmap), ImageDraw.Draw(im_outline) |         draw_bitmap = ImageDraw.Draw(im_bitmap) | ||||||
|  |         draw_outline = ImageDraw.Draw(im_outline) | ||||||
| 
 | 
 | ||||||
|         # Metrics are different on the bitmap and ttf fonts, |         # Metrics are different on the bitmap and ttf fonts, | ||||||
|         # more so on some platforms and versions of freetype than others. |         # more so on some platforms and versions of freetype than others. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user