summaryrefslogtreecommitdiff
path: root/libmat2/images.py
diff options
context:
space:
mode:
authorjvoisin2018-07-02 00:22:05 +0200
committerjvoisin2018-07-02 00:22:05 +0200
commit893f58554ab963f8abd4a08222a311014322fff1 (patch)
treefe4ec24bc5089a6701ab985e1ad3f6a1151ea9a4 /libmat2/images.py
parent11008f8fd436f0b8b00bc600a2cd7a77b55c7494 (diff)
Improve a bit the formatting of the code thanks to pyflakes3
Diffstat (limited to 'libmat2/images.py')
-rw-r--r--libmat2/images.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmat2/images.py b/libmat2/images.py
index a7a9cad..74533b5 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -15,9 +15,9 @@ from gi.repository import GdkPixbuf
15from . import abstract 15from . import abstract
16 16
17 17
18class __ImageParser(abstract.AbstractParser): 18class _ImageParser(abstract.AbstractParser):
19 @staticmethod 19 @staticmethod
20 def __handle_problematic_filename(filename:str, callback) -> str: 20 def __handle_problematic_filename(filename: str, callback) -> str:
21 """ This method takes a filename with a problematic name, 21 """ This method takes a filename with a problematic name,
22 and safely applies it a `callback`.""" 22 and safely applies it a `callback`."""
23 tmpdirname = tempfile.mkdtemp() 23 tmpdirname = tempfile.mkdtemp()
@@ -42,7 +42,7 @@ class __ImageParser(abstract.AbstractParser):
42 meta.pop(key, None) 42 meta.pop(key, None)
43 return meta 43 return meta
44 44
45class PNGParser(__ImageParser): 45class PNGParser(_ImageParser):
46 mimetypes = {'image/png', } 46 mimetypes = {'image/png', }
47 meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', 47 meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName',
48 'Directory', 'FileSize', 'FileModifyDate', 48 'Directory', 'FileSize', 'FileModifyDate',
@@ -65,7 +65,7 @@ class PNGParser(__ImageParser):
65 return True 65 return True
66 66
67 67
68class GdkPixbufAbstractParser(__ImageParser): 68class GdkPixbufAbstractParser(_ImageParser):
69 """ GdkPixbuf can handle a lot of surfaces, so we're rending images on it, 69 """ GdkPixbuf can handle a lot of surfaces, so we're rending images on it,
70 this has the side-effect of removing metadata completely. 70 this has the side-effect of removing metadata completely.
71 """ 71 """