Skip to content

Add partial stubs for mailbox in Python 3#3489

Closed
suutari wants to merge 1 commit intopython:masterfrom
suutari:mailbox-stubs
Closed

Add partial stubs for mailbox in Python 3#3489
suutari wants to merge 1 commit intopython:masterfrom
suutari:mailbox-stubs

Conversation

@suutari
Copy link
Copy Markdown
Contributor

@suutari suutari commented Nov 24, 2019

These stubs cover Message, MaildirMessage, Mailbox and Maildir classes
and the exception classes (*Error).

The stubs for other mailbox subclasses (mbox, MMDF, MH, Babyl), and
their corresponding message classes are incomplete.

These stubs cover Message, MaildirMessage, Mailbox and Maildir classes
and the exception classes (*Error).

The stubs for other mailbox subclasses (mbox, MMDF, MH, Babyl), and
their corresponding message classes are incomplete.
@JelleZijlstra
Copy link
Copy Markdown
Member

We just added mailbox stubs in #3427. Do those cover your use case?

@suutari
Copy link
Copy Markdown
Contributor Author

suutari commented Nov 24, 2019

Oops, I should have checked the master branch. Created the PR from a submodule in mypy so of course I didn't have the latest changes. Doh!

It seems however that those are not entirely correct, since I get this error with my working code:

Argument 1 to "add" of "Mailbox" has incompatible type "EmailMessage"; expected "MaildirMessage"

Maybe I'll create another PR to improve the stubs in master.

@suutari
Copy link
Copy Markdown
Contributor Author

suutari commented Nov 24, 2019

Yep, the mailbox module in master will cover my use cases as soon as #3490 is merged.

@suutari suutari closed this Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants