from email.message import EmailMessage
from email.headerregistry import Address
msg = EmailMessage()
msg['From'] = Address("Pepé Le Pew", "pepe", "example.com")
$ mypy test_mypy.py
test_mypy.py:5: error: Incompatible types in assignment (expression has type "Address", target has type "Union[str, Header]")