diff options
| author | jvoisin | 2018-07-02 00:22:05 +0200 |
|---|---|---|
| committer | jvoisin | 2018-07-02 00:22:05 +0200 |
| commit | 893f58554ab963f8abd4a08222a311014322fff1 (patch) | |
| tree | fe4ec24bc5089a6701ab985e1ad3f6a1151ea9a4 /libmat2/images.py | |
| parent | 11008f8fd436f0b8b00bc600a2cd7a77b55c7494 (diff) | |
Improve a bit the formatting of the code thanks to pyflakes3
Diffstat (limited to 'libmat2/images.py')
| -rw-r--r-- | libmat2/images.py | 8 |
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 | |||
| 15 | from . import abstract | 15 | from . import abstract |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | class __ImageParser(abstract.AbstractParser): | 18 | class _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 | ||
| 45 | class PNGParser(__ImageParser): | 45 | class 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 | ||
| 68 | class GdkPixbufAbstractParser(__ImageParser): | 68 | class 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 | """ |
