mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 19:12:42 +00:00
community[patch]: upgrade to recent version of mypy (#21616)
This PR upgrades community to a recent version of mypy. It inserts type: ignore on all existing failures.
This commit is contained in:
@@ -99,14 +99,14 @@ class GmailSearch(GmailBaseTool):
|
||||
cdispo = str(part.get("Content-Disposition"))
|
||||
if ctype == "text/plain" and "attachment" not in cdispo:
|
||||
try:
|
||||
message_body = part.get_payload(decode=True).decode("utf-8")
|
||||
message_body = part.get_payload(decode=True).decode("utf-8") # type: ignore[union-attr]
|
||||
except UnicodeDecodeError:
|
||||
message_body = part.get_payload(decode=True).decode(
|
||||
message_body = part.get_payload(decode=True).decode( # type: ignore[union-attr]
|
||||
"latin-1"
|
||||
)
|
||||
break
|
||||
else:
|
||||
message_body = email_msg.get_payload(decode=True).decode("utf-8")
|
||||
message_body = email_msg.get_payload(decode=True).decode("utf-8") # type: ignore[union-attr]
|
||||
|
||||
body = clean_email_body(message_body)
|
||||
|
||||
|
Reference in New Issue
Block a user