pallets-eco/flask-mail

assert message.send_to can never fail

Closed this issue · 1 comments

https://github.com/mattupstate/flask-mail/blob/1709c70d839a7cc7b1f7eeb97333b71cd420fe32/flask_mail.py#L175

message.send_to is a set and if it contains None values it still is truthy.

assert set([None]) # True

This should probably be up to the user to filter. This can also be handled by static type checking when it's added. Runtime type checking of arguments is generally not done in Python.