Skip to content

Commit 2ad2b8f

Browse files
author
Peter Tittmann
committed
style: Use ternary operator per ruff SIM108
1 parent 33bb8cb commit 2ad2b8f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mcp_email_server/emails/classic.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ def _strip_html(html: str) -> str:
208208
except UnicodeDecodeError:
209209
text = payload.decode("utf-8", errors="replace")
210210

211-
if content_type == "text/html":
212-
body = _strip_html(text)
213-
else:
214-
body = text
211+
body = _strip_html(text) if content_type == "text/html" else text
215212
# TODO: Allow retrieving full email body
216213
if body and len(body) > 20000:
217214
body = body[:20000] + "...[TRUNCATED]"

0 commit comments

Comments
 (0)