Skip to content

Commit

Permalink
add type annotations in two places where I found this helpful to unde…
Browse files Browse the repository at this point in the history
…rstand the code
  • Loading branch information
FelixSchwarz committed Oct 18, 2024
1 parent da05727 commit c7a089d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schwarz/mailqueue/mailflow_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

__all__ = ['build_check_message', 'send_test_message']

def build_check_message(recipient, sender=None):
def build_check_message(recipient, sender=None) -> Message:
mail = Message()
sender = sender or recipient
mail['From'] = sender
Expand Down
4 changes: 2 additions & 2 deletions schwarz/mailqueue/message_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def retries(self, value):


class InMemoryMsg(BaseMsg):
def __init__(self, from_addr, to_addrs, msg_bytes):
msg_fp = BytesIO(msg_as_bytes(msg_bytes))
def __init__(self, from_addr, to_addrs, msg_bytes: bytes):
msg_fp = BytesIO(msg_bytes)
msg = MsgInfo(from_addr, to_addrs, msg_fp)
super().__init__(msg=msg)

Expand Down

0 comments on commit c7a089d

Please sign in to comment.