When updating from 1.0.0 to 1.2.0 we're seeing all kinds of mypy errors in our code base:
error: "_lru_cache_wrapper[EmailAddress | None]" has no attribute "name" [attr-defined]
At the moment, I'm not sure if this even needs to be fixed in this library, or is related to how we're using it. I found this open issue on mypy's tracker: https://github.com/python/mypy/issues/5858
This affects all usages of
EmailAddress
MailAttachment
BaseMailBox
example
import imap_tools
def attachments(message: imap_tools.MailMessage) -> None:
for attachment in message.attachments:
...
result
$ mypy main.py
main.py:4: error: "_lru_cache_wrapper[list[MailAttachment]]" has no attribute "__iter__" (not iterable) [attr-defined]
Found 1 error in 1 file (checked 1 source file)
When updating from 1.0.0 to 1.2.0 we're seeing all kinds of mypy errors in our code base:
At the moment, I'm not sure if this even needs to be fixed in this library, or is related to how we're using it. I found this open issue on mypy's tracker: https://github.com/python/mypy/issues/5858
This affects all usages of
example
result