summaryrefslogtreecommitdiff
path: root/libmat2/__init__.py
diff options
context:
space:
mode:
authorjvoisin2018-10-12 11:58:01 +0200
committerjvoisin2018-10-12 14:32:09 +0200
commit2ba38dd2a18ab57ed7aac7ccdd6a42ff5e4d4eb7 (patch)
tree7fe800485f6ea47b21f63195c6dfc2f32e675bfe /libmat2/__init__.py
parentb832a5941458083dd6147efb652036552f95b786 (diff)
Bump mypy typing coverage
Diffstat (limited to 'libmat2/__init__.py')
-rw-r--r--libmat2/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmat2/__init__.py b/libmat2/__init__.py
index fbb61bc..f55a14c 100644
--- a/libmat2/__init__.py
+++ b/libmat2/__init__.py
@@ -8,6 +8,7 @@ from typing import Dict, Optional
8 8
9# make pyflakes happy 9# make pyflakes happy
10assert Dict 10assert Dict
11assert Optional
11 12
12# A set of extension that aren't supported, despite matching a supported mimetype 13# A set of extension that aren't supported, despite matching a supported mimetype
13UNSUPPORTED_EXTENSIONS = { 14UNSUPPORTED_EXTENSIONS = {
@@ -36,7 +37,7 @@ DEPENDENCIES = {
36 'mutagen': 'Mutagen', 37 'mutagen': 'Mutagen',
37 } 38 }
38 39
39def _get_exiftool_path() -> Optional[str]: # pragma: no cover 40def _get_exiftool_path() -> str: # pragma: no cover
40 exiftool_path = '/usr/bin/exiftool' 41 exiftool_path = '/usr/bin/exiftool'
41 if os.path.isfile(exiftool_path): 42 if os.path.isfile(exiftool_path):
42 if os.access(exiftool_path, os.X_OK): 43 if os.access(exiftool_path, os.X_OK):
@@ -48,7 +49,7 @@ def _get_exiftool_path() -> Optional[str]: # pragma: no cover
48 if os.access(exiftool_path, os.X_OK): 49 if os.access(exiftool_path, os.X_OK):
49 return exiftool_path 50 return exiftool_path
50 51
51 return None 52 raise ValueError
52 53
53def check_dependencies() -> dict: 54def check_dependencies() -> dict:
54 ret = collections.defaultdict(bool) # type: Dict[str, bool] 55 ret = collections.defaultdict(bool) # type: Dict[str, bool]