mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-08-18 21:57:58 +00:00
enhancement: improve detect_filetype
warning to include filename (#355)
* Improve warning to include filename if provided * Update changelog & version
This commit is contained in:
parent
c51adb21e3
commit
3d21b4098e
@ -1,8 +1,7 @@
|
||||
## 0.5.4-dev1
|
||||
## 0.5.4-dev2
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
||||
* Add `FsspecConnector` to easily integrate any existing `fsspec` filesystem as a connector.
|
||||
* Rename `s3_connector.py` to `s3.py` for readability and consistency with the
|
||||
rest of the connectors.
|
||||
@ -11,6 +10,7 @@
|
||||
* Adds an `UNSTRUCTURED_LANGUAGE_CHECKS` environment variable to control whether or not language
|
||||
specific checks like vocabulary and POS tagging are applied. Set to `"true"` for higher
|
||||
resolution partitioning and `"false"` for faster processing.
|
||||
* Improves `detect_filetype` warning to include filename when provided.
|
||||
|
||||
### Features
|
||||
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "0.5.4-dev1" # pragma: no cover
|
||||
__version__ = "0.5.4-dev2" # pragma: no cover
|
||||
|
@ -229,7 +229,8 @@ def detect_filetype(
|
||||
return EXT_TO_FILETYPE.get(extension.lower(), filetype)
|
||||
|
||||
logger.warning(
|
||||
f"MIME type was {mime_type}. This file type is not currently supported in unstructured.",
|
||||
f"The MIME type{f' of {filename!r}' if filename else ''} is {mime_type!r}. "
|
||||
"This file type is not currently supported in unstructured.",
|
||||
)
|
||||
return FileType.UNK
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user