From 1b9608aecf25d5e58ee27b9b45afd7f77b883f8b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 3 May 2023 22:28:02 +0200 Subject: Use proper type annotations instead of comments --- libmat2/images.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libmat2/images.py') diff --git a/libmat2/images.py b/libmat2/images.py index e7cdf5a..254438b 100644 --- a/libmat2/images.py +++ b/libmat2/images.py @@ -11,9 +11,6 @@ from gi.repository import GdkPixbuf, GLib, Rsvg from . import exiftool, abstract -# Make pyflakes happy -assert Any - class SVGParser(exiftool.ExiftoolParser): mimetypes = {'image/svg+xml', } meta_allowlist = {'Directory', 'ExifToolVersion', 'FileAccessDate', @@ -162,7 +159,7 @@ class PPMParser(abstract.AbstractParser): mimetypes = {'image/x-portable-pixmap'} def get_meta(self) -> Dict[str, Union[str, Dict]]: - meta = {} # type: Dict[str, Union[str, Dict[Any, Any]]] + meta: Dict[str, Union[str, Dict[Any, Any]]] = dict() with open(self.filename) as f: for idx, line in enumerate(f): if line.lstrip().startswith('#'): -- cgit v1.3