Skip to content

Commit 629c688

Browse files
committed
fix: annotate get_body's optional return type (CM-1318)
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent c0c2b06 commit 629c688

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/apps/mailing_list_integration/src/crowdmail/services/parse

services/apps/mailing_list_integration/src/crowdmail/services/parse/noteren.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def message_id_cleanup(messageid: str | None) -> str:
9999

100100
# Strongly based on get_payload() from 'b4' (i.e. almost copied directly...)
101101
# email parsing is rough, charsets are crazy, so let's try to do our best here
102-
def get_body(msg: email.message.EmailMessage) -> str:
102+
def get_body(msg: email.message.EmailMessage) -> str | None:
103103
# walk until we find the first text/plain part
104104
mcharset = msg.get_content_charset()
105105
if not mcharset:

0 commit comments

Comments
 (0)