Commit Graph

3 Commits

Author SHA1 Message Date
Tuomas Suutari
56688240a1 mailbox: Fix signature of Mailbox.update method (#3493)
The `update` method calls `self[key] = message` for each `(key, message)`
pair so it also accepts all the same message types as the `__setitem__`
method.  Fix the signature so that the inputs are not restricted to
`Message` instances or to instance of the `_MessageType` type parameter,
but to the more reluctant `_MessageData` type alias.
2019-11-25 19:45:53 -08:00
Tuomas Suutari
90004af132 mailbox: Couple small fixes (#3490)
* mailbox: Make stub-only helpers private

These HasIteritems and HasItems protocols don't exist in the real
mailbox module so prefix them with underscore to indicate they are
private.

* mailbox: Fix type of message argument

The Mailbox.add and Mailbox.__setitem__ methods take a message argument
which can be anything that is convertible to a Message.  Fix the
signatures accordingly.
2019-11-24 17:54:58 -08:00
Rune Tynan
cd45623ab7 Mailbox stubs (#3427) 2019-11-22 21:03:31 -08:00