1
0
Fork 0
mirror of synced 2025-07-04 20:37:34 +02:00

Improve a bit the formatting of the code thanks to pyflakes3

This commit is contained in:
jvoisin 2018-07-02 00:22:05 +02:00
parent 11008f8fd4
commit 893f58554a
6 changed files with 39 additions and 41 deletions

View file

@ -15,9 +15,9 @@ from gi.repository import GdkPixbuf
from . import abstract
class __ImageParser(abstract.AbstractParser):
class _ImageParser(abstract.AbstractParser):
@staticmethod
def __handle_problematic_filename(filename:str, callback) -> str:
def __handle_problematic_filename(filename: str, callback) -> str:
""" This method takes a filename with a problematic name,
and safely applies it a `callback`."""
tmpdirname = tempfile.mkdtemp()
@ -42,7 +42,7 @@ class __ImageParser(abstract.AbstractParser):
meta.pop(key, None)
return meta
class PNGParser(__ImageParser):
class PNGParser(_ImageParser):
mimetypes = {'image/png', }
meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName',
'Directory', 'FileSize', 'FileModifyDate',
@ -65,7 +65,7 @@ class PNGParser(__ImageParser):
return True
class GdkPixbufAbstractParser(__ImageParser):
class GdkPixbufAbstractParser(_ImageParser):
""" GdkPixbuf can handle a lot of surfaces, so we're rending images on it,
this has the side-effect of removing metadata completely.
"""