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/video.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmat2/video.py') 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 class AbstractFFmpegParser(exiftool.ExiftoolParser): """ Abstract parser for all FFmpeg-based ones, mainly for video. """ # Some fileformats have mandatory metadata fields - meta_key_value_allowlist = {} # type: Dict[str, Union[str, int]] + meta_key_value_allowlist: Dict[str, Union[str, int]] = dict() def remove_all(self) -> bool: if self.meta_key_value_allowlist: @@ -48,7 +48,7 @@ class AbstractFFmpegParser(exiftool.ExiftoolParser): def get_meta(self) -> Dict[str, Union[str, Dict]]: meta = super().get_meta() - ret = dict() # type: Dict[str, Union[str, Dict]] + ret: Dict[str, Union[str, Dict]] = dict() for key, value in meta.items(): if key in self.meta_key_value_allowlist: if value == self.meta_key_value_allowlist[key]: -- cgit v1.3