Commit d0f3534e authored by jvoisin's avatar jvoisin

Hide unsupported extensions in `mat2 -l`

parent 8675706c
Pipeline #19357 failed with stages
in 6 minutes and 16 seconds
......@@ -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)
......@@ -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:
if not extensions:
# we're not supporting a single extension in the current
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment