Use formataddr to format emails
[QA] Minor PEP-8 fixes