Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mat2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jvoisin
mat2
Commits
aa52a5c9
Commit
aa52a5c9
authored
May 14, 2019
by
jvoisin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Please mypy wrt. the last two commits
parent
f19f6ed8
Pipeline
#24721
passed with stages
in 2 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
libmat2/__init__.py
libmat2/__init__.py
+5
-5
No files found.
libmat2/__init__.py
View file @
aa52a5c9
#!/usr/bin/env python3
import
collections
import
enum
import
importlib
from
typing
import
Dict
,
Optional
from
typing
import
Dict
,
Optional
,
Union
from
.
import
exiftool
,
video
# make pyflakes happy
assert
Dict
assert
Optional
assert
Union
# A set of extension that aren't supported, despite matching a supported mimetype
UNSUPPORTED_EXTENSIONS
=
{
...
...
@@ -68,7 +68,7 @@ CMD_DEPENDENCIES = {
}
def
check_dependencies
()
->
Dict
[
str
,
Dict
[
str
,
bool
]]:
ret
=
collections
.
defaultdict
(
bool
)
# type: Dict[str, bool
]
ret
=
dict
()
# type: Dict[str, dict
]
for
key
,
value
in
DEPENDENCIES
.
items
():
ret
[
key
]
=
{
...
...
@@ -76,7 +76,7 @@ def check_dependencies() -> Dict[str, Dict[str, bool]]:
'required'
:
value
[
'required'
],
}
try
:
importlib
.
import_module
(
value
[
'module'
])
importlib
.
import_module
(
value
[
'module'
])
# type: ignore
except
ImportError
:
# pragma: no cover
ret
[
key
][
'found'
]
=
False
...
...
@@ -86,7 +86,7 @@ def check_dependencies() -> Dict[str, Dict[str, bool]]:
'required'
:
v
[
'required'
],
}
try
:
v
[
'cmd'
]()
v
[
'cmd'
]()
# type: ignore
except
RuntimeError
:
# pragma: no cover
ret
[
k
][
'found'
]
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment