callable type hint

This commit is contained in:
revsuine 2024-11-12 18:55:14 +00:00
parent e0959fb9c6
commit 885532f27a
Signed by: revsuine
GPG key ID: 3F257B68F5BC9339

View file

@ -56,7 +56,7 @@ def is_message_encrypted(message: email.message.Message) -> bool:
return message.get_content_subtype() == "encrypted"
def get_encoder_from_msg(msg: email.message.Message) -> function:
def get_encoder_from_msg(msg: email.message.Message) -> typing.Callable:
"""
Return a suitable encoder function from email.encoders based on an input
message. If the input message has no Content-Transfer-Encoding header,