Hide unsupported extensions in mat2 -l
This commit is contained in:
parent
8675706c93
commit
d0f3534eff
@ -33,6 +33,7 @@ def _get_parsers() -> List[T]:
|
||||
|
||||
|
||||
def get_parser(filename: str) -> Tuple[Optional[T], Optional[str]]:
|
||||
""" Return the appropriate parser for a giver filename. """
|
||||
mtype, _ = mimetypes.guess_type(filename)
|
||||
|
||||
_, extension = os.path.splitext(filename)
|
||||
|
2
mat2
2
mat2
@ -96,7 +96,7 @@ def show_parsers():
|
||||
for mtype in parser.mimetypes:
|
||||
extensions = set()
|
||||
for extension in mimetypes.guess_all_extensions(mtype):
|
||||
if extension[1:] not in UNSUPPORTED_EXTENSIONS: # skip the dot
|
||||
if extension not in UNSUPPORTED_EXTENSIONS:
|
||||
extensions.add(extension)
|
||||
if not extensions:
|
||||
# we're not supporting a single extension in the current
|
||||
|
Loading…
Reference in New Issue
Block a user