diff options
| author | jvoisin | 2023-05-03 22:28:02 +0200 |
|---|---|---|
| committer | jvoisin | 2023-05-03 22:28:02 +0200 |
| commit | 1b9608aecf25d5e58ee27b9b45afd7f77b883f8b (patch) | |
| tree | bec20a8bc88dc81891a8c908090d3221cd0178b0 /libmat2/images.py | |
| parent | 2ac8c24dac5431a39cdc091dec47ba594f509387 (diff) | |
Use proper type annotations instead of comments
Diffstat (limited to 'libmat2/images.py')
| -rw-r--r-- | libmat2/images.py | 5 |
1 files changed, 1 insertions, 4 deletions
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 | |||
| 11 | 11 | ||
| 12 | from . import exiftool, abstract | 12 | from . import exiftool, abstract |
| 13 | 13 | ||
| 14 | # Make pyflakes happy | ||
| 15 | assert Any | ||
| 16 | |||
| 17 | class SVGParser(exiftool.ExiftoolParser): | 14 | class SVGParser(exiftool.ExiftoolParser): |
| 18 | mimetypes = {'image/svg+xml', } | 15 | mimetypes = {'image/svg+xml', } |
| 19 | meta_allowlist = {'Directory', 'ExifToolVersion', 'FileAccessDate', | 16 | meta_allowlist = {'Directory', 'ExifToolVersion', 'FileAccessDate', |
| @@ -162,7 +159,7 @@ class PPMParser(abstract.AbstractParser): | |||
| 162 | mimetypes = {'image/x-portable-pixmap'} | 159 | mimetypes = {'image/x-portable-pixmap'} |
| 163 | 160 | ||
| 164 | def get_meta(self) -> Dict[str, Union[str, Dict]]: | 161 | def get_meta(self) -> Dict[str, Union[str, Dict]]: |
| 165 | meta = {} # type: Dict[str, Union[str, Dict[Any, Any]]] | 162 | meta: Dict[str, Union[str, Dict[Any, Any]]] = dict() |
| 166 | with open(self.filename) as f: | 163 | with open(self.filename) as f: |
| 167 | for idx, line in enumerate(f): | 164 | for idx, line in enumerate(f): |
| 168 | if line.lstrip().startswith('#'): | 165 | if line.lstrip().startswith('#'): |
