diff options
| author | jvoisin | 2018-10-12 11:58:01 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-12 14:32:09 +0200 |
| commit | 2ba38dd2a18ab57ed7aac7ccdd6a42ff5e4d4eb7 (patch) | |
| tree | 7fe800485f6ea47b21f63195c6dfc2f32e675bfe /libmat2/__init__.py | |
| parent | b832a5941458083dd6147efb652036552f95b786 (diff) | |
Bump mypy typing coverage
Diffstat (limited to 'libmat2/__init__.py')
| -rw-r--r-- | libmat2/__init__.py | 5 |
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 |
| 10 | assert Dict | 10 | assert Dict |
| 11 | assert 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 |
| 13 | UNSUPPORTED_EXTENSIONS = { | 14 | UNSUPPORTED_EXTENSIONS = { |
| @@ -36,7 +37,7 @@ DEPENDENCIES = { | |||
| 36 | 'mutagen': 'Mutagen', | 37 | 'mutagen': 'Mutagen', |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | def _get_exiftool_path() -> Optional[str]: # pragma: no cover | 40 | def _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 | ||
| 53 | def check_dependencies() -> dict: | 54 | def check_dependencies() -> dict: |
| 54 | ret = collections.defaultdict(bool) # type: Dict[str, bool] | 55 | ret = collections.defaultdict(bool) # type: Dict[str, bool] |
