Skip to content
Snippets Groups Projects
Commit 4372d376 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse/utils: Remove redundant isinstance call

parent 458ad280
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,6 @@ def re_encode_content(
if mimetype.startswith("text/") and encoding not in ("us-ascii", "utf-8"):
# first check if charset_normalizer detects an encoding with confidence
result = charset_normalizer.detect(content_data)
assert isinstance(result["confidence"], float)
if cast(float, result["confidence"]) >= 0.9:
encoding = cast(str, result["encoding"])
content_data = content_data.decode(encoding, "replace").encode("utf-8")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment