This formatting is a bit odd. Why not simply:
```
if email is not None and \
    'email_from' in self.settings and \
    ...:
```
?