summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmat2/abstract.py4
-rwxr-xr-xmat24
2 files changed, 5 insertions, 3 deletions
diff --git a/libmat2/abstract.py b/libmat2/abstract.py
index b7ccae9..7aac284 100644
--- a/libmat2/abstract.py
+++ b/libmat2/abstract.py
@@ -1,6 +1,6 @@
1import abc 1import abc
2import os 2import os
3from typing import Set 3from typing import Set, Dict
4 4
5assert Set # make pyflakes happy 5assert Set # make pyflakes happy
6 6
@@ -15,7 +15,7 @@ class AbstractParser(abc.ABC):
15 self.output_filename = fname + '.cleaned' + extension 15 self.output_filename = fname + '.cleaned' + extension
16 16
17 @abc.abstractmethod 17 @abc.abstractmethod
18 def get_meta(self) -> dict: 18 def get_meta(self) -> Dict[str, str]:
19 pass 19 pass
20 20
21 @abc.abstractmethod 21 @abc.abstractmethod
diff --git a/mat2 b/mat2
index 11699f4..87fa66c 100755
--- a/mat2
+++ b/mat2
@@ -72,6 +72,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool:
72 72
73def show_parsers(): 73def show_parsers():
74 print('[+] Supported formats:') 74 print('[+] Supported formats:')
75 formats = list()
75 for parser in parser_factory._get_parsers(): 76 for parser in parser_factory._get_parsers():
76 for mtype in parser.mimetypes: 77 for mtype in parser.mimetypes:
77 extensions = set() 78 extensions = set()
@@ -82,7 +83,8 @@ def show_parsers():
82 # we're not supporting a single extension in the current 83 # we're not supporting a single extension in the current
83 # mimetype, so there is not point in showing the mimetype at all 84 # mimetype, so there is not point in showing the mimetype at all
84 continue 85 continue
85 print(' - %s (%s)' % (mtype, ', '.join(extensions))) 86 formats.append(' - %s (%s)' % (mtype, ', '.join(extensions)))
87 print('\n'.join(sorted(formats)))
86 88
87 89
88def __get_files_recursively(files): 90def __get_files_recursively(files):