From fa7d18784ca18c5c70bbb36cde9d5915843456c3 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 16 May 2018 22:36:59 +0200 Subject: Do a pylint pass --- src/images.py | 59 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) (limited to 'src/images.py') diff --git a/src/images.py b/src/images.py index 6cc3dfe..c84952a 100644 --- a/src/images.py +++ b/src/images.py @@ -14,11 +14,12 @@ from . import abstract class PNGParser(abstract.AbstractParser): mimetypes = {'image/png', } meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', - 'Directory', 'FileSize', 'FileModifyDate', 'FileAccessDate', - "FileInodeChangeDate", 'FilePermissions', 'FileType', - 'FileTypeExtension', 'MIMEType', 'ImageWidth', 'BitDepth', 'ColorType', - 'Compression', 'Filter', 'Interlace', 'BackgroundColor', 'ImageSize', - 'Megapixels', 'ImageHeight'} + 'Directory', 'FileSize', 'FileModifyDate', + 'FileAccessDate', 'FileInodeChangeDate', + 'FilePermissions', 'FileType', 'FileTypeExtension', + 'MIMEType', 'ImageWidth', 'BitDepth', 'ColorType', + 'Compression', 'Filter', 'Interlace', 'BackgroundColor', + 'ImageSize', 'Megapixels', 'ImageHeight'} def __init__(self, filename): super().__init__(filename) @@ -63,36 +64,38 @@ class GdkPixbufAbstractParser(abstract.AbstractParser): class JPGParser(GdkPixbufAbstractParser): mimetypes = {'image/jpeg'} meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', - 'Directory', 'FileSize', 'FileModifyDate', 'FileAccessDate', - "FileInodeChangeDate", 'FilePermissions', 'FileType', - 'FileTypeExtension', 'MIMEType', 'ImageWidth', - 'ImageSize', 'BitsPerSample', 'ColorComponents', 'EncodingProcess', - 'JFIFVersion', 'ResolutionUnit', 'XResolution', 'YCbCrSubSampling', - 'YResolution', 'Megapixels', 'ImageHeight'} + 'Directory', 'FileSize', 'FileModifyDate', + 'FileAccessDate', "FileInodeChangeDate", + 'FilePermissions', 'FileType', 'FileTypeExtension', + 'MIMEType', 'ImageWidth', 'ImageSize', 'BitsPerSample', + 'ColorComponents', 'EncodingProcess', 'JFIFVersion', + 'ResolutionUnit', 'XResolution', 'YCbCrSubSampling', + 'YResolution', 'Megapixels', 'ImageHeight'} class TiffParser(GdkPixbufAbstractParser): mimetypes = {'image/tiff'} meta_whitelist = {'Compression', 'ExifByteOrder', 'ExtraSamples', - 'FillOrder', 'PhotometricInterpretation', 'PlanarConfiguration', - 'RowsPerStrip', 'SamplesPerPixel', 'StripByteCounts', - 'StripOffsets', 'BitsPerSample', 'Directory', 'ExifToolVersion', - 'FileAccessDate', 'FileInodeChangeDate', 'FileModifyDate', - 'FileName', 'FilePermissions', 'FileSize', 'FileType', - 'FileTypeExtension', 'ImageHeight', 'ImageSize', 'ImageWidth', - 'MIMEType', 'Megapixels', 'SourceFile'} + 'FillOrder', 'PhotometricInterpretation', + 'PlanarConfiguration', 'RowsPerStrip', 'SamplesPerPixel', + 'StripByteCounts', 'StripOffsets', 'BitsPerSample', + 'Directory', 'ExifToolVersion', 'FileAccessDate', + 'FileInodeChangeDate', 'FileModifyDate', 'FileName', + 'FilePermissions', 'FileSize', 'FileType', + 'FileTypeExtension', 'ImageHeight', 'ImageSize', + 'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile'} class BMPParser(GdkPixbufAbstractParser): mimetypes = {'image/x-ms-bmp'} meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', 'Directory', - 'FileSize', 'FileModifyDate', 'FileAccessDate', - 'FileInodeChangeDate', 'FilePermissions', 'FileType', - 'FileTypeExtension', 'MIMEType', 'BMPVersion', 'ImageWidth', - 'ImageHeight', 'Planes', 'BitDepth', 'Compression', 'ImageLength', - 'PixelsPerMeterX', 'PixelsPerMeterY', 'NumColors', - 'NumImportantColors', 'RedMask', 'GreenMask', 'BlueMask', - 'AlphaMask', 'ColorSpace', 'RedEndpoint', 'GreenEndpoint', - 'BlueEndpoint', 'GammaRed', 'GammaGreen', 'GammaBlue', 'ImageSize', - 'Megapixels'} - + 'FileSize', 'FileModifyDate', 'FileAccessDate', + 'FileInodeChangeDate', 'FilePermissions', 'FileType', + 'FileTypeExtension', 'MIMEType', 'BMPVersion', + 'ImageWidth', 'ImageHeight', 'Planes', 'BitDepth', + 'Compression', 'ImageLength', 'PixelsPerMeterX', + 'PixelsPerMeterY', 'NumColors', 'NumImportantColors', + 'RedMask', 'GreenMask', 'BlueMask', 'AlphaMask', + 'ColorSpace', 'RedEndpoint', 'GreenEndpoint', + 'BlueEndpoint', 'GammaRed', 'GammaGreen', 'GammaBlue', + 'ImageSize', 'Megapixels'} -- cgit v1.3