Merge pull request #98 from waterimp/feature/fix-code-comments

fix incorrect comments for "bail if not ..." for WAV and image cases.
This commit is contained in:
gagb 2024-12-17 17:57:25 -08:00 committed by GitHub
commit 1deaba1c6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -882,7 +882,7 @@ class WavConverter(MediaConverter):
"""
def convert(self, local_path, **kwargs) -> Union[None, DocumentConverterResult]:
# Bail if not a XLSX
# Bail if not a WAV
extension = kwargs.get("file_extension", "")
if extension.lower() != ".wav":
return None
@ -998,7 +998,7 @@ class ImageConverter(MediaConverter):
"""
def convert(self, local_path, **kwargs) -> Union[None, DocumentConverterResult]:
# Bail if not a XLSX
# Bail if not an image
extension = kwargs.get("file_extension", "")
if extension.lower() not in [".jpg", ".jpeg", ".png"]:
return None