From cc5be8608b49d74a633b80a95a49a018d4dcd477 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 28 Aug 2022 22:29:06 +0200 Subject: Simplify the typing annotations --- libmat2/exiftool.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libmat2/exiftool.py') diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py index 933ea63..cdfce3d 100644 --- a/libmat2/exiftool.py +++ b/libmat2/exiftool.py @@ -4,23 +4,20 @@ import logging import os import shutil import subprocess -from typing import Dict, Union, Set +from typing import Union from . import abstract from . import bubblewrap -# Make pyflakes happy -assert Set - class ExiftoolParser(abstract.AbstractParser): """ Exiftool is often the easiest way to get all the metadata from a import file, hence why several parsers are re-using its `get_meta` method. """ - meta_allowlist = set() # type: Set[str] + meta_allowlist = set() # type: set[str] - def get_meta(self) -> Dict[str, Union[str, dict]]: + def get_meta(self) -> dict[str, Union[str, dict]]: try: if self.sandbox: out = bubblewrap.run([_get_exiftool_path(), '-json', -- cgit v1.3