1
0
mirror of synced 2024-11-22 09:14:23 +01:00

Improve the detection of unsupported extensions in uppercase

This commit is contained in:
jvoisin 2018-08-23 21:28:37 +02:00
parent f068621628
commit 1c72448e58

View File

@ -36,7 +36,7 @@ def get_parser(filename: str) -> Tuple[Optional[T], Optional[str]]:
mtype, _ = mimetypes.guess_type(filename) mtype, _ = mimetypes.guess_type(filename)
_, extension = os.path.splitext(filename) _, extension = os.path.splitext(filename)
if extension in UNSUPPORTED_EXTENSIONS: if extension.lower() in UNSUPPORTED_EXTENSIONS:
return None, mtype return None, mtype
for parser_class in _get_parsers(): # type: ignore for parser_class in _get_parsers(): # type: ignore