Skip to content

Commit

Permalink
Fixes the magic typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Sep 30, 2024
1 parent 1b9beee commit d1945f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gotenberg_client/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def guess_mime_type_magic(url: Union[str, Path]) -> Optional[str]:
The guessed MIME type, or None if it could not be determined.
"""

import magic
import magic # type: ignore[import-not-found]

try:
return magic.from_file(str(url), mime=True) # type: ignore[misc]
except magic.MagicException:
except magic.MagicException: # type: ignore[misc]
# Handle libmagic exceptions gracefully
return None

Expand Down

0 comments on commit d1945f0

Please sign in to comment.