summaryrefslogtreecommitdiff
path: root/libmat2/video.py
diff options
context:
space:
mode:
authorjvoisin2023-05-03 22:28:02 +0200
committerjvoisin2023-05-03 22:28:02 +0200
commit1b9608aecf25d5e58ee27b9b45afd7f77b883f8b (patch)
treebec20a8bc88dc81891a8c908090d3221cd0178b0 /libmat2/video.py
parent2ac8c24dac5431a39cdc091dec47ba594f509387 (diff)
Use proper type annotations instead of comments
Diffstat (limited to 'libmat2/video.py')
-rw-r--r--libmat2/video.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat2/video.py b/libmat2/video.py
index 39059c5..3e003df 100644
--- a/libmat2/video.py
+++ b/libmat2/video.py
@@ -12,7 +12,7 @@ from . import bubblewrap
12class AbstractFFmpegParser(exiftool.ExiftoolParser): 12class AbstractFFmpegParser(exiftool.ExiftoolParser):
13 """ Abstract parser for all FFmpeg-based ones, mainly for video. """ 13 """ Abstract parser for all FFmpeg-based ones, mainly for video. """
14 # Some fileformats have mandatory metadata fields 14 # Some fileformats have mandatory metadata fields
15 meta_key_value_allowlist = {} # type: Dict[str, Union[str, int]] 15 meta_key_value_allowlist: Dict[str, Union[str, int]] = dict()
16 16
17 def remove_all(self) -> bool: 17 def remove_all(self) -> bool:
18 if self.meta_key_value_allowlist: 18 if self.meta_key_value_allowlist:
@@ -48,7 +48,7 @@ class AbstractFFmpegParser(exiftool.ExiftoolParser):
48 def get_meta(self) -> Dict[str, Union[str, Dict]]: 48 def get_meta(self) -> Dict[str, Union[str, Dict]]:
49 meta = super().get_meta() 49 meta = super().get_meta()
50 50
51 ret = dict() # type: Dict[str, Union[str, Dict]] 51 ret: Dict[str, Union[str, Dict]] = dict()
52 for key, value in meta.items(): 52 for key, value in meta.items():
53 if key in self.meta_key_value_allowlist: 53 if key in self.meta_key_value_allowlist:
54 if value == self.meta_key_value_allowlist[key]: 54 if value == self.meta_key_value_allowlist[key]: